You add a moving average to a candlestick chart.
Now what?
The line is there. The candles are moving around it. Sometimes price is above the line. Sometimes it is below. Sometimes the line points up. Sometimes it turns down.
A beginner can easily see all of this without knowing what any of it actually means.
So in this lesson, we will not add another indicator. We will learn to read the one we already have.
When you see a moving average,
ask three questions:
1. Where is price?
2. Which way is the average moving?
3. How far apart are they?
If these three questions become a habit, a moving-average chart becomes much easier to understand.
1. First, Remember What the Line Actually Is
A 20-day Simple Moving Average is simply the average of the most recent 20 Close prices.
20 recent Close prices
↓
add
↓
divide by 20
↓
SMA 20
On the next trading day, the window moves forward and the calculation is repeated.
That means the moving-average line is made from past price data. Every interpretation in this lesson begins there.
2. What a Moving Average Is NOT
Suppose the current price is above the 20-day SMA. It may be tempting to say:
Price is above the average.
Therefore, existing holders are in profit.
We cannot conclude that.
The SMA is not the average purchase price of investors. It does not know who bought, when they bought, how much they bought, or what their actual cost basis is.
SMA 20
=
average of 20 prices
not
average investor entry price
This distinction matters. We want to read what the chart really contains before adding stories about market participants.
3. Question One: Is Price Above or Below the Average?
Imagine:
Close = 110
SMA 20 = 100
What can we say with confidence?
110 > 100
Current Close
is above
the average of the recent 20 Close prices.
The opposite is just as simple:
Close = 90
SMA 20 = 100
Current Close
is below
the average of the recent 20 Close prices.
We have not predicted the next candle. We have only described where price is now relative to a recent average.
4. Question Two: Is the Moving Average Rising or Falling?
Now look at the direction of the line itself.
SMA today > SMA yesterday
→ moving average is rising
SMA today < SMA yesterday
→ moving average is falling
A rising average tells us that the recent average price level is moving upward. A falling average tells us that it is moving downward.
5. Why Does an SMA Turn Up or Down?
This is one of the most useful ideas in this lesson.
Suppose we use a 20-day SMA. Yesterday's average contained 20 prices. Today, one old price leaves the window and one new price enters.
yesterday
[P1, P2, P3, ... P20]
today
[P2, P3, P4, ... new Close]
Almost all the prices are the same in the two averages. So when we subtract yesterday's SMA from today's SMA, the middle prices cancel.
SMA today - SMA yesterday
=
(today's new Close
- price that left the window)
/ 20
Therefore:
new Close > old Close that left
→ SMA rises
new Close < old Close that left
→ SMA falls
The line is not rising because it “feels bullish.” It is rising because the new price entering the average is higher than the old price leaving it.
6. Now Combine Price and Slope
We now have two observations:
Where is price?
+
Which way is the average moving?
Together they create four simple states.
A. Price Above + MA Rising
Price > MA
and
MA slope > 0
Current price is above its recent average, and the average itself is moving upward.
A clean description is:
current price
and
recent average direction
are aligned upward
Some trend-following traders may view this as bullish context. But the moving average alone does not tell us that new buyers must enter or that the rise must continue.
B. Price Above + MA Falling
Price > MA
but
MA slope < 0
Price has moved above the average, but the average still points downward. One possible context is a rebound after a decline.
This is why looking only at “price above the MA” can hide useful information.
C. Price Below + MA Rising
Price < MA
but
MA slope > 0
The average is still rising, but current price has moved below it. This may occur during a pullback inside a previously rising market, or during the early stage of a larger change.
The moving average alone cannot tell us which one it will become.
D. Price Below + MA Falling
Price < MA
and
MA slope < 0
Current price is below its recent average, and that average is also moving downward.
current price
and
recent average direction
are aligned downward
Again, this describes the present chart structure. It does not guarantee what the next candle will do.
7. The Four States in One Map
MA SLOPE
RISING FALLING
PRICE ABOVE Above + Rising Above + Falling
aligned up transition /
rebound context
PRICE BELOW Below + Rising Below + Falling
pullback / aligned down
transition
Treat these as descriptions of context, not predictions.
8. Question Three: How Far Is Price from the Average?
Consider:
Example 1
Close = 101
SMA = 100
Example 2
Close = 120
SMA = 100
Both satisfy `Price > MA`, but they do not look the same.
So we add a third measurement: distance from the moving average.
Distance %
=
(Close - SMA) / SMA × 100
If Close is 105 and SMA is 100, the distance is +5%. Price is five percent above the average.
9. Does a Large Distance Mean Price Must Reverse?
No.
A large positive distance tells us that price is far above its selected recent average. That can become a research question, but it is not a reversal forecast.
far from MA
≠
automatic reversal
A strong trend can keep price above a moving average for a long time.
10. What About Support and Resistance?
Traders often watch moving averages as possible dynamic support or resistance areas. That is a common use of moving averages in technical analysis.
But the line is not a physical wall.
price approaches MA
→ observe what happens
not
price approaches MA
→ price must bounce
Alphesta will treat support or resistance as something to define and test later, not something to assume.
11. Separate Observation from Interpretation
This is a useful habit for every indicator you will learn.
Observation:
Price > SMA 20
SMA slope > 0
Distance = +3.2%
Interpretation:
Price is above its recent average.
The average is rising.
Price is 3.2% above that average.
Hypothesis:
This may represent an upward-trending context.
Still unknown:
Will price rise tomorrow?
Will buyers enter?
Will the MA act as support?
Is this profitable to trade?
Those are separate questions. Later, we can turn them into rules and test them.
12. Build the Three Measurements with Python
Our Python file calculates exactly the three things we have learned.
1. Price position
Close vs SMA
2. Slope
SMA today - SMA yesterday
3. Distance
(Close - SMA) / SMA × 100
Then it classifies every valid row into one of four states:
ABOVE + RISING
ABOVE + FALLING
BELOW + RISING
BELOW + FALLING
13. Run the Full Python File
Save and run:
python phase3_04_read_moving_average.py
The script downloads recent AAPL data, builds a 20-day SMA from scratch, calculates slope and distance, prints the latest state, finds recent examples of the four states, and creates:
read_moving_average_price_slope_distance.png
Keep the candles visible when you inspect the result.
14. Read the Output in the Same Order Every Time
STEP 1
Look at the candles.
STEP 2
Is Close above or below the MA?
STEP 3
Is the MA rising or falling?
STEP 4
How far is price from the MA?
STEP 5
Only then think about
what the context might mean.
This prevents the indicator from becoming a shortcut that replaces looking at price.
15. Try One Small Experiment
Start with:
moving_average_days = 20
Then try 10 and 50.
Ask:
Does the line react faster?
Does the slope change sooner?
Does the distance become larger or smaller?
Do the four states change dates?
Do not search for the “best” period yet. First learn how the parameter changes what the indicator is showing you.
Check Your Understanding
You are ready to move on if you can explain these ideas:
- A Simple Moving Average is an average of prices, not the average cost basis of traders.
- Price above an MA means the current Close is above the selected recent average.
- A rising SMA means today's average is higher than yesterday's average.
- For an N-day SMA, its one-bar change depends on the new Close entering the window and the old Close leaving it.
- Price position and MA slope create four useful chart states.
- Distance tells you how far price is from the selected average.
- None of these observations guarantees the next price move.
What You Just Learned
Moving Average
↓
1. PRICE
above or below?
↓
2. SLOPE
rising or falling?
↓
3. DISTANCE
how far away?
↓
describe the current context
↓
form a hypothesis
↓
test it later
A moving average does not tell you what the market must do next. It gives you a simple way to describe where price is, which way its recent average is moving, and how far price has moved away from that average.
Now we are ready for the next question: if a moving average is built from past prices, why does it often turn after price has already moved?
That is lag, and it comes next.
References
- Fidelity — Simple Moving Average (SMA): https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/sma
- CME Group — Understanding Moving Averages: https://www.cmegroup.com/education/courses/technical-analysis/understanding-moving-averages.html
- CME Group — Support and Resistance: https://www.cmegroup.com/education/courses/trading-and-analysis/support-and-resistance
- Papailias & Thomakos (2015), *An improved moving average technical trading rule*, Physica A 428, 458–469. https://doi.org/10.1016/j.physa.2015.01.088