Stock research guides · Guide 3 of 10
How to read a stock chart: moving averages and candlesticks
What a price chart actually shows: the window and bar interval, simple and exponential moving averages, and the open, high, low and close inside each candle.
Key takeaways
- The window is how much history you see; the bar interval is how long each bar lasts.
- A 20-period SMA on a daily chart averages 20 trading days, not 20 calendar days.
- An EMA weights recent closes more heavily than an SMA of the same length, and both lag the price.
- Candles show each bar’s open, high, low and close; indicators describe history, not the future.
A price chart combines several choices in one picture: how much history it shows, how long each bar lasts, which price it plots and which averages sit on top. By the end of this guide you will be able to separate those layers, calculate simple and exponential moving averages by hand, and see why none of them predicts the next move.
The window, the bar interval and the price axis
The window is how much history a chart shows: a day, a year, everything available. The bar interval is how much time each bar summarises: a minute, a day, a week. A one-year window of daily bars holds roughly 250 bars, one per trading session; in weekly bars it holds about 52.
The vertical axis shows the price of one share in the currency of the listing, such as US dollars on NASDAQ. It is not your return, which also depends on what you paid, dividends, fees and exchange rates. One company can trade on several exchanges in different currencies, so confirm the listing and its currency first.
A line chart plots one value per bar, normally the closing price, and joins the points. It hides everything between one close and the next: a session that swung widely before closing unchanged draws the same flat line as a quiet one.
Simple moving averages
A simple moving average (SMA) is the arithmetic mean of the last n closing prices, each weighted equally, where n is the number of periods. It moves because the window rolls forward: each new close enters and the oldest drops out.
SMA(n) = (sum of the last n closing prices) ÷ nTake a hypothetical share that closes at 100, 102, 104, 106 and 108 on five consecutive trading days. Its five-day SMA is (100 + 102 + 104 + 106 + 108) ÷ 5 = 104. If the next close is 110, the 100 drops out and the average becomes (102 + 104 + 106 + 108 + 110) ÷ 5 = 106.
The average trails a rising price: 104 was the close two sessions before the latest one, 108, and in a straight-line trend an n-period SMA runs (n − 1) ÷ 2 bars behind. It can also move for reasons unrelated to today, when an unusual close leaves the window.
SMA 20 and SMA 200: short and long lookbacks
A period is one bar, not one calendar day. On a daily chart each bar is a trading session, and weekends and exchange holidays produce no bars, so SMA 20 averages the last 20 trading days: about four calendar weeks. The same setting spans 20 weeks on a weekly chart.
SMA 200 on a daily chart covers 200 sessions, about 40 weeks of trading or roughly nine to ten calendar months. Each close carries a two-hundredth of the weight rather than a twentieth, so it turns far more slowly. That smoothing makes a long trend easier to see, and it hides recent change.
Take a hypothetical share that closed at 100 for most of a year, then at 80 for ten sessions in a row. Its SMA 20 falls to (10 × 100 + 10 × 80) ÷ 20 = 90, while its SMA 200 only reaches (190 × 100 + 10 × 80) ÷ 200 = 99. A long lookback also needs a long history: a share listed eight months ago has not yet produced 200 daily closes.
Exponential moving averages
An exponential moving average (EMA) weights closes unequally: the newest counts most and older closes count progressively less, fading out rather than dropping out. Each new value blends the latest close with the previous EMA through a smoothing factor, α (alpha).
α = 2 ÷ (n + 1)EMA today = α × today's close + (1 − α) × EMA yesterdayTake a hypothetical 9-period EMA standing at 100 when the share closes at 110. With α = 2 ÷ (9 + 1) = 0.2, the new EMA is 0.2 × 110 + 0.8 × 100 = 102. The newest close carries 20% of the weight, against one-ninth, about 11%, in a 9-period SMA.
That is why an EMA reacts faster: after a change of direction it turns sooner than an SMA of the same length, but it also responds to more short-lived noise. It does not remove lag: with α = 2 ÷ (n + 1), its closes have the same average age as an n-period SMA's, (n − 1) ÷ 2 bars, with more weight on the newest and a thin tail of older ones.
Candlesticks: the range inside each bar
A candlestick chart keeps four prices for every bar instead of one: the open, high, low and close.
| Part | What it shows |
|---|---|
| Body | The range between the open and the close |
| Upper wick | The highest price traded during the bar |
| Lower wick | The lowest price traded during the bar |
| Colour | Whether the close was above or below the bar's own open |
| Volume | Shares traded during the bar, often shown beneath the chart |
Take a hypothetical session in which a share opens at 50, trades as high as 54 and as low as 48, and closes at 52. The body runs from 50 to 52 and is coloured as a rising candle, commonly green; the upper wick reaches 54 and the lower wick 48. A line chart would record only the 52, and even the candle cannot show whether the high came before the low.
On a standard candlestick chart, colour compares the close with the bar's own open: had the previous session closed at 53, this candle would still show as rising. Colour schemes vary, so check the key.
Volume counts the shares traded during the bar. It shows how much trading sat behind a move, not who was buying or selling, since every trade has both.
What moving averages and indicators cannot do
Every moving average is built from closes that have already happened, so every one lags: it turns only after the price has. Shorter lookbacks and EMAs turn sooner but pick up more noise, and no setting removes that trade-off.
That matters for crossovers: the price closing through an average, or a shorter average crossing a longer one (for the 50- and 200-day pair, often called a golden cross upwards and a death cross downwards). A crossover describes what has already happened; it is not an automatic instruction to buy or sell, and in a sideways market the price can cross the same average again and again. Whether a crossover rule would have helped is a question for a written, tested rule, and a price above its averages is no forecast either: price momentum can diverge from the business.
A moving average describes where the price has been, not where it is going. Prices can fall as well as rise, and past price patterns do not guarantee future results.
Finally, an indicator is an overlay, a calculation drawn over the price: it changes what you see, never your account or your orders.
Putting it into practice on dotQuant
Without an account you can search any symbol, open its page and use its chart. A search for one ticker can return several instruments, and each result shows the exchange, country and instrument type, so pick the listing before reading the price axis.
The chart offers the windows "1D", "5D", "1M", "6M", "YTD", "1Y", "5Y" and "MAX", drawn as a "Line chart" (the default) or a "Candlestick chart". By default it carries two indicator chips, "SMA 20" and "SMA 200". The indicator editor sets "Type" to SMA or EMA and "Periods" to a preset of 9, 20, 50, 100 or 200, or a custom value from 2 to 500. Indicators are overlays: adding one neither runs a strategy nor places a trade.
For visitors without an account, prices are end-of-day, so each bar is one trading day. Historical and end-of-day data is refreshed automatically, with a top-up shortly after each exchange's close, and a "PREV" chip marks data that still shows the previous session. The "1D" window on its own is no sign of live prices.
Live intraday prices need three things together: an account, the dotQuant desktop app and your own Interactive Brokers market-data subscriptions. The "1D" chart then streams today's 1-minute bars from those subscriptions, labelled "LIVE · IBKR", "DELAYED · IBKR" or "SNAPSHOT · IBKR"; dotQuant does not resell market data. Where there is no intraday data, the info card says "No intraday data — previous close shown; trading is off." The documentation covers market data and broker live bars.
Common questions
Is a 20-day moving average 20 trading days or 20 calendar days?
Trading days. A daily chart has one bar per session and none for weekends or exchange holidays, so a 20-day average spans about four calendar weeks.
Is the 200-day moving average a buy or sell signal?
No. It is the average of the last 200 daily closes, roughly the past 40 weeks. A crossing can be written into a rule and tested, but it describes the past and cannot tell you whether a move will continue.
Why do moving averages differ between charting sites?
Usually the inputs differ: another listing or currency, closes adjusted differently for dividends and splits, a different starting value for an EMA, or an unfinished current bar. Compare the instrument, bar interval, type and period first.
Further reading
- From trading idea to testable rules: turning a moving-average idea into rules and judging a backtest honestly.
- How to research a company: choosing the right listing and checking whether a price is live, delayed or end-of-day.
- Economic moats, management quality and macro momentum: why price momentum and business growth can part ways.
- FCA InvestSmart: the UK regulator's guidance on investment risks.