BT Trading · Help Center
BadTeacher Trading
A trading chart app: candlesticks, 49 indicators, a script editor, alerts, replay, about 90 drawing tools, watchlists and paper trading.
Crypto prices are live from Binance, Bitstamp, OKX, MEXC, Gate.io and Bybit.
Stocks, funds, futures, forex and indices come from Yahoo Finance.
Capital.com works too, once you add your own API key (see below).
What's in this folder
| File | What it does |
|---|---|
index.html | The page layout and styles (colors, sizes, positions) |
app.js | Market data, chart, timeframes, time zones, indicators on the chart, watchlist, search, paper trading |
indicators.js | The formulas for all indicators (RSI, MACD, Bollinger Bands, ...) |
pine.js | Runs BadScript, the language you write in the Script Editor |
account.js | Sign in / create account, and saving your app data to your account |
home.js | The Home page (market summary, indices, crypto, stocks, news) |
tools.js | The Screener, Calendars (economic and earnings) and Heatmaps pages |
cycles.js | The Cycle Lows indicator (daily / weekly / yearly cycle lows and everything around them) |
data/ | Made when the first account is created: the accounts and their saved data (private, not uploaded to git) |
drawings.js | The drawing toolbar on the left and everything you draw on the chart |
serve.js | A small web server. It shows the page and fetches data from the exchanges, Yahoo, Nasdaq and Capital.com |
logo.webp | The BadTeacher logo (the black-and-white drawing) in the header, browser tab, sign-in page, Home and Help. To change it, replace it with a new round image of the same name, then change logo.webp?v=2 to ?v=3 in the files so browsers load the new one |
logo-bw.webp | The previous logo (the photo in black and white). To use it again, copy it over logo.webp |
logo-color.webp | The original colour logo. To use it again, copy it over logo.webp |
signin-flag.webp | The Vergina sun behind the chart on the sign-in page (shown in black and white). Replace it with another image of the same name to change it |
signin-flag-photo.webp | The earlier flag photo for the sign-in page. To use it again, copy it over signin-flag.webp |
package.json | Tells Node.js how to start the app (npm start) |
.env.example | Template for your Capital.com API key (optional) |
The only program you need is Node.js (version 22.9 or newer). Nothing else has to be installed:
the chart library loads from the internet when the page opens.
Start the app (step by step)
1. Open the project in IntelliJ
- Open IntelliJ IDEA.
- Click File → Open... (on the welcome screen: Open).
- Go to
C:\Users\zarko\IdeaProjects\BadTeacher Tradingand click OK. - If IntelliJ asks "Trust and open project?", click Trust Project.
2. Open the terminal inside IntelliJ
- Press Alt + F12, or click View → Tool Windows → Terminal.
- A panel opens at the bottom. It is already "inside" the project folder.
3. Check that Node.js is installed
Type this and press Enter:
node --version
You should see something like v26.13.0.
If you get "node is not recognized", install Node.js from https://nodejs.org (the LTS button),
then close and reopen IntelliJ and try again.
4. Start the app
Type:
npm start
You should see:
BadTeacher Trading: http://localhost:5173
5. Open it in your browser
Open Chrome/Edge and go to http://localhost:5173.
At the top right you should see a green dot and Live · Binance (or the source of the symbol you picked).
6. Stop the app
Click inside the terminal and press Ctrl + C.
Making changes
- Edit
index.html,app.js,indicators.js,pine.jsordrawings.js, save (Ctrl + S), then refresh the browser (F5). - If you edit
serve.jsor.env, stop the app (Ctrl + C) and runnpm startagain.
Using the chart
- Add a symbol: click + above the watchlist (or the symbol name at the top left). Search by ticker or name, or just pick a tab and scroll: every crypto pair on the six exchanges (about 7,300), every US stock and ETF (about 12,900), 28 commodities, index futures, 226 forex pairs and 92 indices (29 world indices plus Nasdaq's own indices, such as PHLX Semiconductor SOX, Nasdaq Biotechnology NBI, OMX Stockholm 30 and the Nasdaq Crypto Index).
- Ticker pictures: every symbol has a round picture in the watchlist, search and chart header: coin icons (CoinCap's icon set, then the open-source cryptocurrency-icons set), company and ETF logos, two overlapping country flags for forex pairs, the country's flag for indices and index futures (coloured badges for S&P 500, Nasdaq 100, Dow and Russell), and drawn icons for commodities (gold, silver, oil, gas, wheat, coffee, cattle…). When no picture exists (e.g. a brand-new coin), a coloured badge with its first letter shows instead. Pictures load from the internet, so they need a connection.
- Nasdaq: pick the Nasdaq source in the search window to see only Nasdaq: every stock and ETF listed on Nasdaq (about 5,600) plus Nasdaq's indices (badge NQ). Nasdaq's index charts come straight from nasdaq.com: daily bars for their full history (weekly and monthly are built from them) and 1-minute prices for the latest trading session only (5m, 15m, 1h are built from those). Nasdaq-listed stocks use Yahoo Finance, which has longer history than nasdaq.com. nasdaq.com does not share commodity prices, so commodities still come from Yahoo Finance. More rows load as you scroll; the bottom line shows how many there are. Click + on a row to add it, or the row itself to open its chart. Hover a watchlist row and click × to remove it.
- Indicators: click Indicators at the top. The window works: on the left Favorites, My scripts (your Script Editor scripts, with an Edit button) and Technicals (all 87 built-in indicators, or one group such as Momentum, where DSS Bressert and MACD are).
- Cipher A and Cipher B (search "market cipher"): look-alikes of the popular Market Cipher indicators. The real Market Cipher is a paid, closed-source script, so these are built from the same public formulas its free versions use. Cipher B (own pane): WaveTrend waves (light and dark blue), the yellow VWAP wave, the green/red money-flow area, small dots on every wave cross, big green buy dots when the waves cross up below −53 and big red sell dots when they cross down above +53 (levels ±53/±60). Cipher A (on the candles): an 8-EMA ribbon (5, 11, 15, 18, 21, 24, 28, 34) with signals: green dot (EMA 11 crosses above EMA 34), red dot (EMA 5 drops below EMA 11), blue dot (EMA 11 above EMA 15), red diamond-dot (WaveTrend crosses down above 0) and big yellow dot (strong sell: WaveTrend crosses down from overbought with RSI above 65). All lengths and levels can be changed with the gear.
- Pivot points (group Pivot points): Classic, Fibonacci, Woodie, Camarilla and DeMark levels (P, R1–R3, S1–S3; Camarilla also R4/S4) from the previous day, week, month or year, plus Pivot Points High/Low (swing highs and lows). The gear sets the period: 1 = auto (daily pivots on charts up to 15 minutes, weekly up to 4 hours, monthly on daily charts, yearly above), 2 = day, 3 = week, 4 = month, 5 = year. Pivot lines don't stretch the price scale.
- Also: Williams Alligator, Williams Fractals, Zig Zag, McGinley Dynamic, MA Cross, Moving Average Ribbon, Linear Regression Channel, Standard Error Bands, Chande Kroll Stop, Chandelier Exit, 52 Week High/Low, Fisher Transform, Know Sure Thing, Coppock Curve, Price Oscillator (PPO), Relative Vigor Index, Connors RSI, Balance of Power, Bull Bear Power, Accelerator Oscillator, Woodies CCI, Chaikin Volatility, Relative Volatility Index, Mass Index, Standard Deviation, Average Day Range, Klinger Oscillator, Price Volume Trend, Volume Oscillator, Net Volume, Cumulative Volume Delta (estimated from each bar's range, since real delta needs every single trade) and Relative Volume. Click the ☆ next to an indicator to add it to Favorites; the window opens there next time. Click a name to add it to the chart (you can add the same one twice, e.g. two moving averages). Hover its name on the chart to hide it, set an alert (bell), change its settings (gear) or remove it (×).
- Date line (time axis): it sits at the very bottom, under the indicator panes. Drag it left or right to stretch or squeeze the bars; the chart and all panes follow.
- Mouse and wheel: wheel over the chart zooms in and out (with auto on, the prices re-fit). Wheel over the prices on the right stretches or squeezes them. Click and drag the chart to move it in any direction (dragging up or down turns auto off; sideways keeps it on); drag the prices on the right to stretch them. Shift + wheel (or a sideways trackpad swipe) scrolls in time. Click auto at the bottom right (or Alt+A, or double-click the price axis) to fit the prices to the screen again, and » to jump back to the newest bar.
- Bottom bar: the clock shows the chart's time zone; click it to pick any time zone in the world. % shows percent change, log a logarithmic scale (Alt+L), auto fits prices to the screen (Alt+R resets the whole chart).
- Multi-chart layouts: the layout button (top right, first icon) shows 1 chart, 2 side by side, 2 stacked, 3 or 4 charts. The main chart (with drawings, indicators and alerts) is always top-left. Each extra chart has its own symbol (click its name to change it), timeframe, live price and volume; the ↗ button opens it in the main chart. In the same menu, Sync makes the crosshair, date range, symbol or interval follow across charts. Narrow windows show the main chart only.
- Full history: scroll or drag the chart to the left and older bars keep loading ("Loading older bars…"), as far back as the exchange or Yahoo has data; the All button loads the full range. Limits come from the sources themselves: Yahoo keeps 1-minute bars for about 30 days and other intraday bars for about 60 days (hourly about 2 years); daily, weekly and monthly go back decades. The crypto exchanges keep their full history.
- Chart types: Glass candles (the default: each candle a glowing see-through glass block; zoom in and wide candles get a lit top and a shaded side, like 3D glass bars; they use the theme's up/down colours or your own from the chart settings), Candles, Hollow candles, Heikin Ashi, OHLC bars, Columns (green when the close is above the bar before, red below), High-low (a box from each bar's low to its high), Line, Step line, Line with markers, Area, HLC area (the close line, green fill up to the high, red down to the low), Baseline (the drop-down at the top).
- Renko, Line break, Kagi, Point & figure, Range: at the bottom of the same drop-down. These charts are built from price moves instead of time, and indicators are calculated on them. The box size uses the usual ATR method (the 14-bar Average True Range); a message shows the size when you switch. Renko: a brick each time the close moves one box (turning around takes two). Line break: three-line break. Kagi: a line that turns when the price reverses one box. Point & figure: rising columns (hollow, like X) and falling columns (solid, like O), 3-box reversal. Range: every bar covers exactly one box from low to high.
- Price scale modes: right-click the chart: Auto, Log scale, Percent scale, Indexed to 100 (the first bar on screen = 100), Invert scale.
- Symbol search shortcuts: just start typing a letter on the chart and the search opens with it; Ctrl+K opens it too. The usual market names work: SPX (S&P 500), NDX, DJI / US30, DXY, VIX, GOLD / XAUUSD, SILVER, USOIL / WTI, UKOIL / BRENT, DAX / GER40, UKX, NI225. Indices, commodities and forex come before same-named stocks or crypto-exchange pairs.
- Change interval by typing: type a number on the chart, e.g.
15+ Enter = 15 minutes,4h,1D,1W,1M(month),30s. - Layers and values panel (the third button in the right bar): Layers lists the symbol, every indicator and every drawing on the chart: click a name to select it, the eye hides or shows it, the lock locks a drawing, ✕ removes it, the gear opens an indicator's settings. Values shows every value of the bar under the crosshair (the newest bar otherwise): date, time, open, high, low, close, change, volume and each indicator line.
- Top-right buttons: Compare (add other symbols as % lines over the chart; remove them with × in the top-left legend), Create alert (bell, see Alerts below), Replay (see below), Snapshot (saves the chart as a PNG to your Downloads folder), Full screen.
- Resize indicator panes: drag the line above an indicator pane (RSI, MACD, ...) up or down. The pane above it gives or takes the space (or the main chart, for the first pane). Double-click the line to reset all panes. Sizes are remembered.
- Home page: click the logo at the top left, or ☰ → Home. Market summary: a large chart you can switch between S&P 500, Nasdaq 100, Dow 30, Bitcoin and Gold. Below it, Major indices, Crypto market cap (total market cap, dominance, top coins), Commodities and Stocks, each with price, daily change and a mini chart, then Top stories. Click any row (or the big chart) to open its chart; Search (Ctrl+K) opens symbol search; Open chart or ✕ goes back. Ctrl+K also opens search from the chart.
- Main menu (☰ at the top left): Calendar and the Theme picker (Dark / Green / Light).
- Themes (Dark / Green / Light): in the main menu (☰), or the button at the top right (Sign in, or your name), pick Dark, Green or Light under Theme. The whole app switches at once: charts, indicators, drawings, menus and panels. Dark is black, Green is a dark green-teal, Light is white. Your choice is remembered (and follows your account when signed in); until you choose, the app follows your computer's dark/light setting.
- Accounts (Sign in): the Sign in button at the top right → Sign in opens a full-screen sign-in page (artwork on the left, signing in on the right). Choose Continue with Google or Email; Sign up at the bottom switches to creating an account (name, email, a password of at least 8 characters), and Continue without an account closes the page. You can use the app without an account, as before.
- Google sign-in (optional, about 5 minutes once): 1) go to https://console.cloud.google.com, create a project, open APIs & Services → OAuth consent screen and fill in the app name and your email (type External). 2) Open Credentials → Create credentials → OAuth client ID, type Web application, and under Authorized JavaScript origins add
http://localhost:5173. 3) Copy the Client ID into your.envfile afterGOOGLE_CLIENT_ID=and restart the app (npm start). Google's real button then appears on the sign-in page. Without it, the Google button explains this and Email works as usual. - Signed in, everything the app saves (watchlists, flags, chart layouts, drawings, indicators, alerts, scripts and settings) is saved to your account every few seconds. Signing in from another browser brings it all back.
- When you create an account, what you already have in this browser moves into it. When you sign out, this browser goes back to what it had before you signed in.
- Click your name for the account menu: Change password… (signs out your other browsers), Sign out, Delete account….
- Accounts are kept by the server on your computer, in the
datafolder (only a secure hash of each password is stored). To use your account from another computer or phone, that device has to reach this computer's server. Accounts neednpm start; the shared online page works without them. - Chart layouts: the layout name at the top right (Unnamed at first) with the ⌃ button next to it. A layout keeps the main chart's symbol, timeframe, chart type, indicators (and pane sizes), drawings, compare lines and the multi-chart grid.
- The menu has Save layout (Ctrl+S), Autosave (on: changes are saved by themselves every few seconds; off: the name shows a blue Save until you save), Make a copy…, Rename…, Download chart data… (the bars and every indicator value as a CSV file for Excel), Create new layout… (a clean chart of the same symbol), the 5 most recently used layouts, and Open layout… (press . on the keyboard) to search, rename or delete all of them.
- Opening another layout reloads the page with that layout. With autosave off you are asked whether to save your changes first.
- Replay: click the replay button (◀◀) at the top, then click a bar on the chart: everything after it is hidden. Press ▶ to play the bars back one by one (pick the speed next to it), ▶| (or Shift+→) for one bar at a time, Select bar to pick another start, and Real-time to go back to live prices. Indicators follow the replay; live updates pause until you leave it. The chart stays where you were looking when you pick the start bar (it doesn't jump back to today).
- Alerts: click the bell at the top, the + in the Alerts panel, or the bell next to an indicator's name on the chart. Pick what to watch (the price or any indicator line on the chart), the condition (crossing, crossing up/down, greater/less than, entering/exiting a channel) and a value or another line. Trigger: only once, once per bar, or once per bar close. Set an expiration (or open-ended), a name and a message.
- Alerts on drawn lines: right-click a trend line, ray, extended line, info line, trend angle, horizontal line or horizontal ray → Add alert on …. The alert fires when the price crosses the line (a sloped line keeps going past its two points). If you move the line, the alert follows it; if you delete the line, the alert stops firing. Works while that symbol and timeframe are on the main chart.
- Cycle Lows indicator (DCL / WCL / YCL): Indicators → search "cycle". Our own build of the features described in the CF Cycle Trading Indicator documentation; the detection rules are ours, from common cycle-trading practice. Use it on the 1D chart (other timeframes work roughly, with a warning). Settings: the gear next to its name (or double-click the name):
- Daily Cycle Lows (DCL): the low of each short cycle. ✅ confirmed when price turns back up after the low (close above the fast EMA as it turns up; Faster confirmation needs only the close), 🕓 unconfirmed (still forming), ❌ cancelled (price closed below it too early in the next cycle), 🔄 updated (a new low replaced a cancelled one). Confluence H / M / L at confirmation from three checks: breakout above the last swing high, momentum (RSI rising), support (close above the slow EMA or volume above average). Icons (shape, size, colour) can be changed. Cancelled lows (❌) are hidden unless you turn on Show cancelled lows; no vertical lines are drawn.
- Weekly Cycle Lows (WCL) and Yearly Cycle Lows (YCL): the lowest daily (weekly) low of each longer cycle, confirmed when price closes above the slow (long) EMA; cancelled when broken too early. Own icons and colours.
- Future Cycle Low Range: shaded bands where the next DCL, WCL and YCL are expected (from the latest confirmed low, using the cycle ranges). Colour and opacity per band.
- Cycle Translation: each daily cycle's top marked LTR (red, topped early, bearish), MTR (orange) or RTR (green, topped late, bullish); the running cycle too.
- Cycle Range Midpoint: a line halfway between two cycle lows (daily, weekly or yearly): solid / dashed / dotted, full-length option, width, and a shaded range box with a visibility slider.
- Cycle Arcs: arcs from low to low showing the rhythm: on/off, up/down, height, width, visibility, colour.
- SMA: length, source, offset, width, colour. Cycle Count Number: days between DCLs and weeks between WCLs under each low.
- Tables over the chart: fine-tuned asset detection badge (green on a fine-tuned asset on 1D, yellow/red otherwise, optional list), Cycle Low Windows (days since the last DCL, weeks since the last WCL, unconfirmed lows, early / in window / late), Asset Cycle Count (the expected daily, weekly and yearly cycle lengths) and US Macro Data (CPI, core CPI, core PCE, unemployment, payrolls, Fed funds rate, GDP growth and jobless claims from FRED, green/red for bullish/bearish changes, a bullish meter and "Powell's tie"; needs
npm start). - Fine-tuned templates and adjustment: 16 assets have their own starting cycle ranges (BTC, ETH, SOL, XRP, S&P 500, Nasdaq 100, Dow, Russell 2000, gold, silver, oil, copper, DXY, EUR/USD, GBP/USD, USD/JPY), picked automatically or by hand; these are typical ranges from cycle-trading literature, not CF Trading's numbers. Adjust the cycle length factor, fast and slow EMA lengths, overbought / oversold filters and faster confirmation.
- Alerts: in the settings' Alerts section tick the events (new / cancelled / updated / pending DCL, new / pending WCL) and click Create alert. It appears in the Alerts panel and fires through your notification choices while that symbol and timeframe are on the chart.
- Visible Range Volume Profile: in the Indicators window (Volume, or search "volume profile"). For the bars on screen it shows how much was traded at each price, as bars from the right edge: green for rising bars' volume, red for falling, brighter inside the Value Area (70 % of the volume), and an orange line at the busiest price (Point of Control). It updates as you scroll and zoom. Its settings: number of rows, value area %, width.
- Multi-chart sync: in the layout menu (the grid button at the top) you can sync the crosshair, the date range, the symbol and the interval across the charts.
- Notifications (the row at the bottom of the alert window): Notify in app (a notification from your browser on this device), Show toast notification (a message in the page corner), Send email (to your account's email; needs you signed in and email set up, see "Optional: alert emails" below), Webhook URL (the alert's message is POSTed to your URL; a message written as JSON is sent as JSON), Play sound (pick a sound and how long it plays; ▶ to listen), Send plain text (a short email to another address, such as a phone's email-to-SMS address). Notification schedule: 24/7, weekdays, or custom days and hours; outside it the alert still fires and shows in the log but sends nothing. Apply keeps the choices, Cancel or ← goes back without them. New alerts start with the choices you applied last.
- The Alerts panel is the clock icon on the far right bar (the list icon above it brings back the watchlist; clicking the open one hides the side column). Hover an alert to stop/restart, edit or delete it; click it to open its chart. The Log tab lists every alert that fired.
- Price alerts are checked every second for any symbol. Alerts that use an indicator or "once per bar close" need the bars, so they run while that symbol and timeframe are on the main chart (the panel says Waiting otherwise). Everything runs in your browser, so alerts only work while the app is open.
- Script Editor: the Script Editor tab under the chart (next to Paper trading). Pick New script or one of the examples from the menu, change the code, then Save (Ctrl+S) and Add to chart (Ctrl+Enter). Saved scripts also appear under My scripts in the Indicators dialog, and their
setting.int/setting.floatvalues can be changed with the gear on the chart. Errors show at the bottom with the line number (click to jump there). Words (top right of the editor) lists everything the language knows. Drag the top edge of the editor to make it taller; ⌄ minimizes the panel. - Scripts are written in BadScript, BadTeacher Trading's own language:
script(),setting., variables (=and:=), maths,and/or/not,cond ? a : b, history likeclose[1], one-line functionsf(x) => ...,[a, b, c] = calc.macd(...),calc.(sma, ema, rma, wma, vwma, hma, rsi, macd, bands, keltner, stoch, atr, cci, mfi, wpr, dmi, supertrend, highest, lowest, stdev, change, roc, crossUp, crossDown, pivotHigh, pivotLow, barsSince, valueWhen, vwap, ...),math.,color.,none/isNone/ifNone,draw()(style.line,style.step,style.histogram,style.columns,style.dots,style.broken) andlevel(). Scripts written the older Pine-style way (indicator,plot,ta.*) still run, and saved ones were rewritten in BadScript's words once. - Not supported yet:
if/for/whileblocks,var, strategies (backtests), and drawings likeplotshape,bgcolor,fill,label,line,box,table(these are skipped with a note). Scripts written elsewhere that use those need small changes. - Bottom bar, left: 1D 5D 1M 3M 6M YTD 1Y 5Y All jump to that date range (and pick a fitting bar size); the calendar button (Alt+G) jumps to a date.
- Bar countdown: the small label under the last price shows how long until the current bar closes.
- Crypto market cap and dominance (CRYPTOCAP): search USDT.D, BTC.D, ETH.D, USDC.D, TOTAL, TOTAL2 (without BTC) or TOTAL3 (without BTC and ETH). Also works without the dot (usdtd), with "dominance" (usdt dominance), or with the CryptoCap source chip, which lists all seven. Data: CoinMarketCap's free public charts, daily back to 2013 (USDT.D from 2015), hourly for the last 30 days (1h and 4h charts), and live values every minute. Market caps read: 2.584T, 845.300B. Needs the app running on your computer (npm start).
- Drawing on indicators: every drawing tool works on the indicator panes too (RSI, MACD, DSS, Stochastic… any indicator in its own pane). Pick a tool on the left and click on the pane: trend lines, horizontal lines, rays, channels, shapes, text, Fibonacci… Each drawing stays on its pane and uses that indicator's own values (a horizontal line on RSI at 70 stays at 70). Select, drag, change, copy, undo (Ctrl+Z) and delete (Del) work as on the chart; the drawings are saved per symbol and come back with the indicator. (Alerts on lines and the magnet work on the main chart.)
- New listings come in by themselves: the app never keeps a fixed list of tickers. Every exchange's list is re-read every 10 minutes (Binance, Bitstamp, OKX, MEXC, Gate.io, Bybit, Coinbase, Kraken) and the US stock and ETF list every 6 hours, so a ticker an exchange adds shows up in search on its own. For 7 days it has a gold NEW tag in search. If an exchange doesn't answer, its last list is kept. (When each ticker was first seen is kept in
data/tickers-seen.json.) - Coins priced in US dollars (Coinbase and Kraken): every coin Coinbase trades against USD (about 400) and every coin Kraken trades against USD (about 680), next to Bitstamp's and the other exchanges' USD pairs. Search btcusd, solusd… or click the Coinbase or Kraken chip (nothing typed lists them all). Live prices, charts from 1m to 1M; Coinbase loads older history as you scroll back, Kraken's free data covers its newest 720 bars of each timeframe (about 2 years on 1D).
- Weekly and monthly bars: weeks start on Monday and months (quarters, years) on the 1st, 00:00 UTC, for every source. Stocks, indices, forex and commodities load their full weekly and monthly history (S&P 500 weekly from 1970).
- Future dates:, the date line continues after the newest bar (300 bars ahead on any timeframe). Drag the chart left to see them; you can draw in that area and the crosshair shows its dates. (Not on Renko, Line break, Kagi, Point & Figure and Range charts, whose bars are built from price moves.)
- Uniswap (DEX): every Uniswap pool (v2, v3 and v4) on every network (Ethereum, Arbitrum, Base, BNB Chain, Optimism, Polygon…). In the search click the Uniswap chip and type a token (pepe, uni, a contract name…); with nothing typed it lists the busiest Uniswap pools. Under All the Uniswap pools also appear, after the exchanges. Each pool is priced in its second token (PEPE / WETH in WETH), with 1m to 1D charts and live prices every 15 seconds. Data: GeckoTerminal's free API. It shares only the last 180 days and about 20 requests a minute, so the first load of a pool can take a few seconds when it is busy.
- More CryptoCap symbols: OTHERS (the market outside the top 10: the whole market minus BTC, ETH, USDT, XRP, BNB, SOL, USDC, TRX, DOGE and ADA, today's top 10), OTHERS.D, and BTC / ETH as market caps (CRYPTOCAP:BTC).
- US rates and economy: US03MY, US05Y, US10Y, US30Y (Treasury yields, live from Yahoo / Cboe), US02Y (2-year yield, daily close from FRED), FEDFUNDS (Fed funds effective rate, monthly), USINTR (Fed target rate, upper bound) and USBCOI (US business confidence). Elsewhere USBCOI usually means the ISM PMI, which ISM does not allow to be shared for free, so here USBCOI is the OECD's US manufacturing business confidence survey (net balance, monthly, via FRED): it moves the same way, on a different scale. The FRED source chip lists the FRED ones.
- Symbol math: type two symbols with */ + − between them in the search, e.g. US10Y/US02Y, BTCUSDT/USDT.D, BTCUSD/GOLD, OTHERS/BTC, FEDFUNDS-US02Y*, and pick the ƒ Symbol math* result. Each side comes from its own source at the same interval and they are lined up in time (a side with no bar at that moment, like gold at the weekend or a daily FRED value during the day, keeps its last value). In a formula, BTC and ETH mean their market caps and BTCUSD means Bitstamp's. Write
EXCHANGE:SYMBOLto choose (BINANCE:BTCUSDT). EUR/USD and ETH/BTC stay normal pairs. Formulas can be added to watchlists and get alerts like any symbol. - Your profile: signed in, click your name at the top right → Edit profile…. Add a picture (Upload picture, or drop one on the circle; it is cut to a circle and made 256 × 256), your name, About me (300 characters), location, website and social links (X, YouTube, Telegram, Instagram). Remove takes the picture off. A new account opens this window right after signing up (Skip closes it). With Google sign-in your Google picture is used until you upload your own. Pictures are stored in the
data/folder next to the app, and the profile needs the app running on your computer (npm start). - Renaming a watchlist: open the list menu (the list's name at the top of the watchlist) and point at any list under Recently used: click the ✏ pencil next to its star. Open list… (Shift+W) has the same pencil on every row, and Rename… renames the open list.
- Watchlist width:, drag the border between the chart and the right panel: left makes the panel wider, right narrower. Drag past the narrowest width and it fades; let go and the panel closes. To get it back, drag the border next to the right bar to the left (or click its icon on the right bar). The width is remembered; double-click the border for the normal width.
- Details height: drag the border above Details up (taller Details, shorter list) or down; the height is remembered. Double-click the border for the automatic height.
- Folding panels to the bottom: drag Details (its top border) or News / Fear & Greed (its title bar) all the way down and it folds to just its title bar at the bottom; drag it up again to open it.
- Watchlist sorting: click Symbol, Last or Chg %; click again to reverse, a third time for your own order.
- Several watchlists: click the list name above the watchlist (e.g. WATCHLIST ⌄) for the menu: add an alert on the whole list (any symbol moving more than X % today), make a copy, rename, add a section heading, clear the list, create a new list, upload a list, download the list, switch between recently used lists (☆ marks favourites) and Open list… (Shift+W) to see, search or delete all of them. Upload and download use the common text format of charting apps (
BINANCE:BTCUSDT,NASDAQ:AAPL,###SECTION), so lists move between the two. - Colour flags: hover a watchlist row and click the small flag at its left to flag it red, orange, green, blue, purple, cyan or pink. Each colour's flagged list shows every symbol with that flag, across all your lists (open it from the list menu, see below).
- Symbol details (the panel under the watchlist): for the symbol on the chart: price and change, whether its market is open, the day's range and 52-week range (with a marker at the price), key stats (open, previous close, volume, 30-day average volume), performance over 1 week, 1 month, 3 months, 6 months, year to date and 1 year, and Technicals: a gauge from Strong sell to Strong buy, worked out on daily bars from 12 moving averages (price above = buy) and 7 oscillators (RSI, Stochastic, CCI, Momentum, MACD, Williams %R, Awesome Oscillator), with how many say buy, neutral or sell. Click Details to fold it away.
- Flagged lists: each colour is its own list: Red flag list, Orange flag list… They are a group of their own in the list menu (under Recently used) and in Open list…, with how many symbols each has. While a flagged list is open, + (or pasting) adds symbols to it with that flag, and you can drag them into your own order. Rename a flagged list (e.g. Red flag list → Long ideas): click the pencil next to it in the list menu or in Open list…, or open it and choose Rename… in the list menu. The colour stays the same; the name is saved.
- Sections and dragging: drag any symbol or section heading up or down to put it somewhere else (a blue line shows where it lands). Right-click a symbol → Add section above… to start a section there, or use Add section… in the list menu. Click a section heading to fold or unfold the symbols under it; double-click it (or right-click it) to rename it. Dragging works while the list is in your own order (no sorting arrow, empty filter).
- Selecting symbols: click a symbol to select it (and open its chart), Ctrl + click to add or take away more, Shift + click to select a range. Right-click for the menu: open chart, copy, paste, add section, flag, remove.
- Copy and paste (Ctrl + C / Ctrl + V):
- Drawings: click a drawing to select it, Ctrl + C, then Ctrl + V on any chart. On the same chart the copy goes a few bars to the right; on another symbol it keeps its dates and prices.
- Indicators: click an indicator's name (top left) or its line to select it (a blue frame shows it), Ctrl + C, then Ctrl + V adds a copy with the same settings, on this or any other chart. Esc lets go.
- Watchlist symbols: select one or more symbols, Ctrl + C, open another list (or a flagged list) and Ctrl + V. They are copied as text too (
BINANCE:BTCUSDT,NASDAQ:AAPL), so you can paste them in a message, and a list of tickers copied from somewhere else can be pasted into the watchlist (this needsnpm start). - Timeframes: click the small ▾ next to the timeframe buttons to see all of them. Click ☆ to add one to the bar, ★ to remove it.
- Drawing tools (left bar): click a tool, then click on the chart. Hover a tool and click the small › to see more tools in that group.
- Bars pattern (in the forecasting tools): click the first and the last bar of a stretch you want to copy. The copy sits on top of the original; drag it anywhere (for example into the future) and it keeps the same shape, in %, at its new price.
- Favorite tools: in those menus, click the ☆ next to a tool to star it. Starred tools appear in a small floating bar; drag its dotted handle to move it anywhere in the app (over the chart, the watchlist, the news or the bottom panel). It remembers the spot, also when the window changes size. The ★ button at the bottom of the left bar shows or hides that bar.
- News: the panel under the watchlist opens on News: headlines about the symbol on your chart, newest first, with the source and how long ago. Open another chart and the news follows it. Click a headline to read it in a new tab. For coins the news comes from CoinDesk, Cointelegraph, Decrypt, CryptoSlate, The Block, Bitcoin Magazine, CryptoPotato and U.Today (plus Google News for smaller coins); for stocks, funds, indices and commodities from Yahoo Finance. All crypto (or Market for stocks) shows all the latest news. It refreshes every 5 minutes; ↻ refreshes now.
- Crypto Fear & Greed: the second tab of that panel. The gauge (0 = extreme fear, 100 = extreme greed), with yesterday, last week and last month. Drag its title bar (or the small line above it) up to make the panel taller, down to make it shorter; the gauge and numbers keep their size (a short panel scrolls). The ⌄ button folds it away.
- Bottom panel (Script Editor / Paper trading / Economic Calendar): the Economic Calendar tab shows the same week of events as ☰ → Calendars (same filters), with the next US elections (midterms and presidential, with a countdown) on top; an election also shows as an All day row on its day.
- Bottom panel size: drag its top edge (the line above the tabs) up or down to make it taller or shorter. Drag it all the way down to minimize it, and up again to open it (or use the ⌄ button). The height is remembered.
- Bitcoin on-chain indicators: Indicators → Bitcoin on-chain: NUPL, MVRV Z-Score, Puell Multiple (own panes), Pi Cycle Top (111-day MA and 350-day MA × 2), 2-Year MA Multiplier, Trolololo trend line and Top Cap (lines over the candles; meant for a Bitcoin chart). All from Coin Metrics' free daily data since 2010 (needs
npm start). BadTeacher Bitcoin Cycle Index (0–100) averages 7 of them, each scored by where it stands against its own last 4 years: about 95 at past tops, under 10 at past bottoms. RHODL, Reserve Risk and CVDD are not included (they need paid data). - Market Data (no longer a tab; code kept): the Market Data panel (drag its top edge up to see more). All from free public sources, refreshed every minute; hover a card for a short explanation.
- Futures for the coin on your chart (Bitcoin when the chart isn't a coin), from Binance, OKX and Bybit: funding rate per exchange with its recent history (positive = longs pay shorts), open interest (total value of open futures positions) with a 72-hour chart, long/short accounts (Binance) and taker buy/sell ratio.
- Crypto market (CoinGecko, DefiLlama): total market cap and 24h change, BTC/ETH dominance, stablecoin supply and DeFi value locked with 6-month charts.
- Bitcoin network (mempool.space, blockchain.com): hash rate, next difficulty change, fees and waiting transactions, active addresses and transactions per day.
- Not included: metrics that only paid data providers sell (realized price, MVRV, holder cost bases, ETF flows).
- Screener: ☰ → Screener (or Screener on the Home page). Stocks: every US-listed stock (about 6,500) with price, change, volume, market cap and sector, from nasdaq.com (delayed). Crypto: the 500 biggest coins from CoinGecko, with 1h / 24h / 7d change, volume, market cap and distance from the all-time high. Presets (top gainers, top losers, most active, large cap, penny stocks, near all-time high), a search box, sector and market-cap filters; click a column title to sort; click a symbol to open its chart. Needs
npm start. - Calendars: ☰ → Calendars. Economic: this week's and next week's economic events (ForexFactory): time (your time zone), currency, importance (1–3 bars), actual, forecast and prior. Filter by importance and currency; past events are dimmed. Earnings: the companies reporting on each day of the next two weeks (nasdaq.com), biggest first: before the open (☀) or after the close (☾), EPS estimate, number of estimates, EPS a year ago, market cap. Needs
npm start. - Heatmaps: ☰ → Heatmaps. US stocks: the 200 biggest companies, grouped by sector; Crypto: the 100 biggest coins. Each tile's size is its market cap and its colour today's change (deep red −3 % or worse, grey 0, deep green +3 % or better). Point at a tile for details, click it to open the chart. Needs
npm start. - Testers (backtests): the Backtester tab is no longer in the bottom panel; a tester's trades still show as arrows on the chart. Start a script with
tester(...)instead ofscript(...)and place trades withtrade.open,trade.close,trade.closeAllandtrade.exit(stop loss / take profit, in ticks withloss=/profit=or as prices withstop=/limit=), usually insideifblocks. The Script Editor's menu has two examples (New tester: MA cross and RSI with stop and target). Add the tester to the chart: every trade shows as an arrow on the candles. The backtest works out: - Overview: net profit, closed trades, percent profitable, profit factor, max drawdown, average trade, open P&L, and the equity curve next to buy & hold.
- Performance Summary: all, long and short trades side by side (gross profit/loss, wins/losses, averages, largest trades, commission, buy & hold).
- List of Trades: every trade with its entry and exit (signal, date, price), size, profit, cumulative profit, run-up and drawdown.
- Settings in
tester(...)work:capital,size_type(trade.fixed,trade.percentof equity,trade.cash),size,fee(%). Orders fill at the next bar's open; stops and targets fill inside the bar. One position at a time: a trade the other way reverses it. Not supported yet: values that depend on earlier trades, pyramiding,varand loops. - Paper trading: the Paper trading tab under the chart: your practice account on the left, the order ticket in the middle, open positions and working orders on the right. The account is saved (and follows your account when signed in); Reset account starts again with a balance you choose.
- Take profit and stop loss on the chart: tick Take profit / Stop loss in the ticket. The chart shows a green zone from your entry to the target and a red zone to the stop, from when the position opened; each line's label shows what hitting it would make or lose. A pending limit or stop order shows its own target and stop too (fainter). A buy needs its target above the price and its stop below; a sell the other way round. Drag a line to move it; right-click it to remove it.
- Add position (right-click the chart): Add position: buy / sell places a paper order at the price you clicked (a limit order on the near side of the market, a stop order beyond it), using the quantity in the ticket. Long / Short position drawing here puts a position drawing at that spot.
- Community (the speech-bubble button at the top right, next to your name): needs
npm startand a signed-in account. A red number shows unread messages. - Chats: find people by name and message them, or + New group (private, or public so anyone can find and join it). The group's owner can add and remove members (Members). Share trade posts one of your paper trades (open positions with their profit now, or recent trades) as a card; Open chart on a card opens that symbol. Others see your name and picture, never your email.
- Ideas for the app: post an idea, vote for the ones you want (▲), and comment. You can delete your own ideas and comments.
- Stored in
data/social.json. Deleting your account removes your messages, ideas, comments and votes. - Order types: Market (fills now), Limit (buy below / sell above the price; fills when the price gets there, at that price or better) and Stop (buy above / sell below; becomes a market order when the price gets there). Pick the type, the price and the quantity, then Buy or Sell.
- Take profit and stop loss: tick them in the ticket and set their prices (they start 2 % away). When the price reaches one, the position closes and a message tells you.
- On the chart: the position is a line at its average price (with its open profit), plus a dashed line for its take profit (TP), stop loss (SL) and every working order (BUY LMT, SELL STP…). Drag any of those dashed lines up or down to move it. Right-click an order line to cancel it, a TP/SL line to remove it, or the position line to add a take profit or stop loss, reverse or close the position. the chart also has Sell / Buy buttons at the top left (with the quantity between them: click it to change it); Settings → Trading → Buy/sell buttons hides them.
- Edit a drawing: click it to select, drag it or its dots to move. Delete removes it, Ctrl + Z undoes, Ctrl + Y (or Ctrl + Shift + Z) redoes.
- Long / Short position (forecasting tools): click the entry, then the target. The green zone is the target and the red zone the stop. Select it (or point at it) to see the labels: target and stop distance (price, %, ticks and amount), and in the middle the trade result from the real candles: Closed P&L once price reached the target or stop (the stop counts first if one candle touched both), otherwise Open P&L at the latest price, with the quantity and the risk/reward ratio. The quantity follows the usual defaults (25 % risk of a 1,000 account) until you change them: double-click the position. Drag the square handles: left edge = entry, target and stop; right edge = how long the trade lasts.
- Path and polyline: click to add points, then press Enter (or click the last point again) to finish.
- Shortcuts: Alt+A add alert, Alt+R reset chart (prices fit the screen, newest bar in view), Alt+I invert the price scale, Alt+L log scale, Alt+G go to date, Alt+W add the symbol to the watchlist, Alt+T trend line, Alt+H horizontal line, Alt+J horizontal ray, Alt+V vertical line, Alt+C cross line, Alt+F Fibonacci retracement, Ctrl+Z undo, Ctrl+Y redo, Ctrl+C / Ctrl+V copy and paste, Ctrl+K symbol search, a letter opens symbol search, a number changes the interval, / indicators, Delete removes the selected drawing, Esc cancels.
- Selected drawing toolbar: click a drawing and a small toolbar appears: colour, line width, line style, settings (gear), lock (a locked drawing can't be moved or deleted until you unlock it), clone (a copy a few bars to the right) and remove. Drag its dotted handle to put it anywhere on the chart; it remembers the spot.
- Right-click: on the chart: reset chart view, copy the price under the mouse, add an alert at that price, add indicator, remove all drawings or indicators, auto / log / invert scale. On a drawing: settings, clone, lock/unlock, remove. On an indicator's line: its settings, hide/show, remove. While placing a drawing, right-click cancels it. Press / to open the Indicators window.
- Chart settings: the gear button at the top, right-click the chart → Settings…, or double-click a candle. Changes show on the chart straight away; Ok keeps them, Cancel (or Esc) puts everything back. Each chart layout keeps its own settings.
- Symbol: body, border and wick colours for up and down candles (untick to hide), Color bars based on previous close, line colour for line/area charts, precision (decimals).
- Status line: what the top-left legend shows: title (ticker, description or both), open/high/low/close, bar change, and indicator titles, inputs and values.
- Scales and lines: last price label and line, countdown to bar close, high and low price labels (highest and lowest price on screen), indicator value and name labels on the price scale, time zone.
- Canvas: background (solid or gradient, your colours), vertical and horizontal grid lines, crosshair colour, width and style, watermark (symbol and timeframe behind the bars), scale text colour and size, top/bottom margins (%) and right margin (bars).
- Trading: your paper-trading position as a line at its average price, with size and open profit; buy/sell marks on the bars. Alerts: show alert lines and their colour.
- Template (bottom left): Apply defaults, or Save as… to keep a set of settings and reuse it later.
- Double-click: a candle opens the chart settings; an indicator's line or its name on the chart opens its settings; a drawing opens its settings (colour, line width 1–4, solid/dashed/dotted, delete); a text drawing opens the text. For Long/Short positions the settings are account size, risk %, and the entry, target and stop prices.
Data sources and credits
Open the account menu (the button at the top right: Sign in, or your name) → About & credits for the full list. In short:
- Crypto: the exchanges' public market data (Binance, Bitstamp, OKX, MEXC, Gate.io, Bybit, Coinbase, Kraken); market cap and dominance from CoinMarketCap; Uniswap pools powered by GeckoTerminal; Fear & Greed from Alternative.me.
- Stocks, indices, forex, commodities: Yahoo Finance; US listings and Nasdaq indices from Nasdaq; US rates and economy from FRED (Federal Reserve Bank of St. Louis).
- Charts: drawn with TradingView Lightweight Charts™, free under the Apache 2.0 licence (Copyright © TradingView, Inc., https://www.tradingview.com/). Its licence asks for its notice and a link to TradingView on a page users can reach: that is the About & credits window, so keep it there.
- Prices can be delayed and are for information only, not investment advice. Some of these sources (Yahoo Finance, CoinMarketCap's public chart data) are meant for personal use: for a public or paid app, use their official, licensed data plans.
Going live (a public app)
Step by step, for 0 €: see [deploy/GO-LIVE.md](deploy/GO-LIVE.md): a free Oracle Cloud server, a free DuckDNS web address and free HTTPS. deploy/make-package.ps1 packs the app, and deploy/setup-server.sh sets up the server with one command (public mode is switched on there for you).
- Public mode: open
.envand setPUBLIC_MODE=1, then restart (npm start). This turns off Yahoo Finance and nasdaq.com, which are not allowed in a public app: their stocks, indices, futures and forex disappear from search and the watchlist, the stock screener and earnings calendar are switched off, and stock news uses Google News headlines only. Crypto, FRED and everything else keep working. - Stocks back (optional, paid): get a Twelve Data plan that allows showing data to the public (their free plan is for personal use only; see https://twelvedata.com/pricing-business), copy the API key from your Twelve Data dashboard, and paste it as
TWELVEDATA_API_KEY=in.env. US stocks, funds, forex, gold and silver then come from Twelve Data. Indices and futures stay off (they need exchange licences). - Your details in the legal pages: open
legal.jsand fill inOWNERat the top (your name or company, address, contact email, website). Anything still in [square brackets] shows highlighted in yellow in the app, so you can see what's missing. - Terms of Service, Privacy Policy, Not financial advice: shown from the first-visit notice at the bottom of the screen, the account menu (under About & credits), the sign-in page and About & credits. They were written for North Macedonia (Law on Personal Data Protection) and the EU's GDPR; have a lawyer read them before you charge money.
- Still check before going live: the economic calendar (ForexFactory's feed), Google News and CoinMarketCap's public charts are also unofficial feeds.
Optional: Capital.com
Capital.com only shares prices with account holders, through an API key.
- In Capital.com, turn on two-factor authentication, then open Settings → API integrations and generate a key. You set a custom password for the key there.
- In IntelliJ, copy
.env.exampleand name the copy.env(same folder). - Fill in
CAPITAL_API_KEY,CAPITAL_IDENTIFIER(your login email) andCAPITAL_PASSWORD(the key's custom password). Save. - Stop the app and run
npm startagain. The terminal should say Capital.com: connected. - Capital.com symbols now appear in search, with a purple CP badge. Click the Capital.com chip with nothing typed to browse every Capital.com market A to Z (forex, shares, indices, commodities, crypto). The app reads Capital.com's whole market menu once, which takes a minute the first time, and keeps the list for 12 hours.
Keep .env private. It is listed in .gitignore so it is never uploaded with your code.
Optional: IC Markets (through cTrader)
IC Markets doesn't publish prices on its website. Its prices are available through the official cTrader Open API, using your own IC Markets cTrader account (a free demo account works). Setting it up takes about 10 minutes, once:
- IC Markets account: on https://www.ic.com open a cTrader account (choose cTrader as the platform; demo is fine). You get a cTrader ID (email + password).
- Register a free app: go to https://openapi.ctrader.com, sign in with that cTrader ID, open Applications → Add new app. Give it any name (e.g. BadTeacher Trading) and add this redirect URI:
http://localhost:5173/ctrader/callback. Save. cTrader reviews new apps; wait until its status shows Active (often quick, sometimes a day). - Copy the keys: on the app's page click Credentials and copy the Client ID and Secret.
- In IntelliJ open your
.envfile (create it from.env.exampleif you don't have one) and fill inCTRADER_CLIENT_ID=andCTRADER_CLIENT_SECRET=. Save. - Stop the app (Ctrl + C) and run
npm startagain. The terminal says IC Markets (cTrader): sign in once at http://localhost:5173/ctrader/connect. - Open http://localhost:5173/ctrader/connect in your browser, sign in with your cTrader ID and click Allow. You come back to a page saying IC Markets connected.
- Refresh the app. In the symbol search, pick the IC Markets source: every symbol on your account (forex, metals, energies, indices, shares, crypto) with a green IC badge. Charts use bid prices, like the cTrader platform, and update live.
The sign-in is saved in .ctrader-token.json in the project folder (private, like .env; it is listed in .gitignore). If it ever stops working, open the connect link again. The app only asks cTrader for read-only access to your account information and prices; it never places trades.
Optional: alert emails
For Send email and Send plain text in an alert's Notifications, the app sends the emails through your own email account.
- Gmail: turn on 2-Step Verification in your Google account, then open https://myaccount.google.com/apppasswords and create an app password (16 letters). Use that, not your normal password.
- Open your
.envfile (copy.env.exampleto.envif you don't have one) and fill in:
```
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_USER=you@gmail.com
SMTP_PASS=the app password
SMTP_FROM=you@gmail.com
```
(Outlook: SMTP_HOST=smtp-mail.outlook.com and SMTP_PORT=587.)
- Stop the app (Ctrl + C) and run
npm startagain. The terminal should say Alert emails: on. - Send email goes to the email of the account you're signed in with; Send plain text goes to the address you type in the alert.
Optional: CoinMarketCap Fear & Greed
Without a key, the Fear & Greed panel shows the free Alternative.me index (the panel says which one it shows).
To use CoinMarketCap's own index:
- Sign up for a free key at https://coinmarketcap.com/api/ (Basic plan).
- Put it after
CMC_API_KEY=in your.envfile (create.envfrom.env.exampleif you haven't yet). - Stop the app and run
npm startagain. The terminal should say Fear & Greed: CoinMarketCap.
If something goes wrong
| Message | What it means | Fix |
|---|---|---|
EADDRINUSE ... 5173 | The app is already running somewhere | Close the other terminal, or press Ctrl + C there |
bad option: --env-file-if-exists | Your Node.js is older than 22.9 | Install the current LTS from https://nodejs.org |
| Badge says Simulated | The page can't reach that symbol's price source | Check your internet connection and that you opened http://localhost:5173, not the file directly |
| Stocks say CLOSED | The market is closed (evenings, weekends) | Normal. Prices update again when the market opens |
| Capital.com sign-in failed | A value in .env is wrong | Check the key, email and the key's custom password |
| IC Markets: could not connect (under the symbol search) | The cTrader sign-in expired or the app isn't active yet | Check the app is Active at openapi.ctrader.com, then open http://localhost:5173/ctrader/connect again |
Notes: Yahoo Finance data is free and unofficial, so it may be delayed up to 15 minutes.
Drawings, the watchlist, indicators, alerts, scripts and settings are saved in your browser. Paper trades reset when you reload the page.