Module 2 / 2
MA, RSI and MACD indicators in practice
Moving average, RSI and MACD from the formula side: period, price source, smoothing, and comparing a signal with a control group on your sample.
- Author
- Zordon Intelligence Sp. z o.o.
- Updated
- 14 min read
- Structure sources
- 2
What indicators are and where their value comes from
This lesson is for someone who already knows market structure and can mark a zone, and who now wants to understand exactly what a moving average, RSI and MACD calculate — and how to check whether an indicator-based condition changes anything at all. Each of the three is a transformation of the same price, so none of them carries information that was not already in the price. They differ in how they smooth and in what they highlight.
An indicator plays one of two roles in a plan. It can be a precondition — deciding whether you even look for a setup that day. It can be a setup filter — deciding which of the formations based on structure you consider. The role of “entry signal” is the hardest one, because an indicator is a derivative of price and reacts after the fact. On the Warsaw Stock Exchange, the filter “only positions above the D1 MA200” tends to be readable on liquid indices; on a CFD the same rule has to be checked against costs, because a derivative of price knows nothing about the spread.
Moving average: formula, period and price source
A moving average answers one question: what was the average price over the last n periods. The period and the price source are parameters you write into your plan, not settings you “feel”.
SMA(n) = (price_1 + price_2 + … + price_n) / n
EMA(n) = price × k + EMA_previous × (1 − k), where k = 2 / (n + 1)
source = the candle close (or typical price — choose one)
period n = illustrative number: 50, 100 or 200 (a convention, not a rule)
Three consequences follow directly from those formulas:
- A moving average lags by half its window. The larger
nis, the later the average reacts to a price reversal, but the fewer false changes of direction it produces. That is a trade-off, not an improvement. SMAandEMAgive different values on the same chart.EMAweights recent candles more heavily, so it changes slope sooner. Two platforms will show two different lines if one usesSMAand the otherEMAwith the samen.- Slope is separate information from a crossover. Price crossing an average only says that price changed sides relative to the window. The slope of the average says whether the window is rising at all.
Warming up the window is part of the definition: the first n candles on a chart do not yet have a full average, and the value from that stretch is understated or distorted. That is why you start a test only after at least n candles have closed.
RSI: the ratio of average gains to average losses
RSI does not measure price — it measures the relationship between the average gain and the average loss within a window. That is why it takes values from 0 to 100 regardless of the instrument.
gain = max(0, close − previous_close)
loss = max(0, previous_close − close)
RS = average gain / average loss (both averages over n periods)
RSI(n) = 100 − 100 / (1 + RS)
period n = illustrative number: 14 (a convention, not a rule)
Three things worth writing into your plan:
- Smoothing changes the result. In the original definition the average gains and losses are smoothed with Wilder’s method, that is exponentially, with a coefficient of
1/n. Some platforms simply use a plain average over the window. This is not cosmetic — at the samenthe readings can differ, so record which variant you use. - The levels 30 and 70 are a convention. They are not a law, nor a boundary beyond which price “must” turn back. In a strong downtrend RSI can stay low for many sessions, because losses still outweigh gains in every window.
- An extreme is a description of a state, not an event. A reading below 30 says that over the last
nperiods losses were clearly dominant. It does not say when that will end.
Changing the period n works much like changing the lookback window for structure: a smaller n produces more extreme readings and more noise, a larger n produces fewer signals, but more stable ones.
MACD: the difference between two exponential averages
MACD is not an oscillator bounded to a range. It is the difference between two exponential averages, and therefore a value expressed in the price units of the instrument.
EMA_fast = EMA(price, 12) (illustrative number)
EMA_slow = EMA(price, 26) (illustrative number)
MACD = EMA_fast − EMA_slow
signal = EMA(MACD, 9) (illustrative number)
histogram = MACD − signal
Two practical conclusions:
- The MACD value depends on the price of the instrument. A reading of
0.05on an instrument quoted at $100 and0.05on one quoted at $5 describe completely different moves. Compare the sign, the slope and the crossover with the signal line — not the raw number across instruments. - A crossover only makes sense with an entry condition and an invalidation. A line crossover on its own does not say where to place the stop, and therefore does not say what the position size should be.
The histogram is often more convenient than two lines because it shows the difference, but it is still the same information presented in another form. If you use the histogram, do not count it again as “confirmation”.
How to compare a signal with a control group
An indicator condition has to be compared with what happens without it. Otherwise you do not know whether it adds anything — or merely sounds serious. Splitting into two groups is simple and needs no tools beyond a spreadsheet.
group_A = sessions in which the indicator condition was met
group_B = sessions in which the condition was not met
difference = mean result in R of group A − mean result in R of group B
SEM = std_dev / square root of N (separately for each group)
SEM_diff = square root of (SEM_A² + SEM_B²)
interval = difference ± 1.96 × SEM_diff
The steps:
- Write the condition down as a number. For example: the D1 close above
SMA(200)numerically, not “above the average”. - Choose one outcome variable and apply it to both groups. Ideally the R-multiple from the same structural setup — then the two groups differ only in the indicator condition.
- Keep the same instrument, period and parameters. Change nothing while you are collecting rows.
- Calculate the standard error, not the range. For each group calculate
SEM = std_dev / square root of N, and for the difference between the meansSEM_diff = square root of (SEM_A² + SEM_B²). The confidence interval for the difference isdifference ± 1.96 × SEM_diff. If that interval includes zero, you have no basis for claiming the filter changes anything. The spread of results within a group grows with the sample and says nothing on its own about the uncertainty of the mean. - Record the outcome in your journal as a decision: keep the filter, drop the filter, or keep collecting.
Sample size matters here exactly as it does in the lesson expectancy and drawdown. With a standard deviation of 1.2R and an edge of 0.3R (illustrative numbers), a single group needs about 62 trades for its own confidence interval to cut off zero. The interval for the difference between two groups is wider by the square root of two, so the same edge requires about 124 trades in each group. Five sessions per group is not enough for any conclusion about a filter.
Treat other people’s comparisons and numbers from the internet as material to verify, not as your own result. There is no percentage here that you could copy — there is a procedure you run on your own instrument.
A/B worksheet: fill it in with your own data
Copy the table into a spreadsheet. The columns are empty on purpose, and you fill in rows after each session. Variant A covers sessions in which the indicator condition was met, variant B the sessions from the same period in which it was not. You set the condition and the threshold before the sample begins.
| Session | Date | Instrument | Variant (A / B) | Indicator value | Condition threshold | Structural setup? (yes/no) | Result (R) | Note |
|---|---|---|---|---|---|---|---|---|
Once the table is filled in, take a screenshot of the D1 chart on your chosen instrument with the moving average marked, label it with the date and the ticker, and attach it to your journal. The point is for your lesson to rest on your market and your date, not on somebody else’s graphics. Run the group comparison as described in the lesson backtesting and forward testing, and analyse the result together with the standard error, not just the mean — an indicator that improves the mean while results are widely scattered is not yet a filter.
When an indicator says “do not trade”
Four conditions, each stated as a rule. Meeting any one of them means skipping the setup or postponing the decision.
- The indicator condition is not written down as a number. If you cannot state the period, the price source and the threshold, you do not have a filter — you have chart wallpaper that justifies a decision you made for other reasons.
- The indicator condition contradicts the structure. Going long because RSI is low, in an environment of new lower highs and lower lows, is trading against the structure. The higher timeframe and the structure decide before the indicator does.
- A parameter changed during the sample. After you change the period you no longer know whether the condition works or whether you fitted a number to noise. Changing it after a losing streak is a classic case of fitting to the outcome.
- Several indicators are calculating the same thing. MA, RSI and MACD all derive from the same price and are correlated with one another; three agreeing readings are often one piece of information calculated three times. Look at correlation and leave one condition in your plan.
The order is always the same: price, structure and zone first, then one indicator condition, and position size last. The reverse order turns an auxiliary tool into the main reason for the trade.
Common mistakes when working with indicators
- A dashboard with five oscillators — more lines do not mean more information, and a crossover of two similarly constructed indicators adds nothing.
- Optimising the period every week to suit the latest trades, instead of holding a parameter through the whole test.
- Entering on divergence alone with no level and no stop; divergence can warn of weakening momentum, but it does not define an invalidation.
- Treating “oversold” in a strong downtrend as an invitation to buy a full-size position.
- Comparing raw MACD values across instruments with different prices — those are numbers in price units, not percentages.
- Abandoning the sample after three losses and “tweaking” the parameter, so that the rows collected so far stop being comparable.
- Forgetting about costs — an indicator condition knows nothing about the spread, so calculate the reward-to-risk relationship after costs.
Measurable exercise
Choose one instrument and one structural setup you can already describe. Write the indicator condition down as a number: for example SMA(200) on D1 closes, with no changes for the whole sample. Record sessions from the same period: variant A is those in which the condition was met, variant B those in which it was not. Fill in the A/B table above after each session and record the result in R.
Finally, calculate the mean result in R for both groups along with SEM = std_dev / square root of N, and set the confidence interval for the difference between the means as difference ± 1.96 × SEM_diff. Five sessions per group is far too few to conclude anything about a filter — with a sample that small, SEM is many times larger than the difference itself, so the interval will almost always include zero. It follows that this exercise checks the consistency of your measurement, not the effectiveness of the filter. The honest conclusion from five sessions is: I keep collecting, and I postpone judging the filter until a sample on the order of 124 trades per group, which is twice the threshold of about 62 trades derived in the lesson expectancy and drawdown. Keep the journal metrics according to the rules described in that same lesson.
What is the correct order of work with indicators?
An indicator is a transformation of price, so it does not replace a level, an invalidation or a position size.
Common questions
Does RSI below 30 mean I have to buy?
No. A reading below 30 says that losses were clearly dominant in the last window. In a strong downtrend that situation can last for many sessions. You need a level, agreement with structure and an exit plan — the reading alone is not a signal.
Which average should I choose — 50 or 200?
The one you write into your plan and keep unchanged for the whole sample. The numbers 50 and 200 are a convention, not a rule. A shorter period changes slope sooner, a longer one produces fewer false changes. Test it on your own sample and pick one value.
Is RSI or MACD divergence enough to enter?
Rather as a warning of weakening momentum. Divergence does not define a level of invalidation, so entering on it alone leaves the position size without a basis. Combine it with a zone and a specific stop.
Why compare a signal with a control group when I can see it on the chart?
Because a condition that looks good and a condition that actually changes something are two different things. The control group shows what the same setup produces in sessions where the condition was not met — and only the difference between the groups is information. Without that comparison you cannot distinguish a filter from simply confirming a decision you had already made. Numbers from the internet do not replace this step, because they concern a different instrument, a different period and somebody else's definition of the signal.
Advertisement
Key takeaways
- Indicators are transformations of the same price: a moving average smooths it over a window, RSI compares average gains with average losses, and MACD is the difference between two exponential averages. This lesson gives the formulas and parameters plainly, shows what each one actually measures, and provides a protocol for comparing a signal against a control group. Without that comparison you cannot tell whether the condition changes anything or merely adds confidence.
Structure sources
The material is based on source documents. Variable values — fees, limits, regulatory figures — are worth checking at the source before making a decision.
- StockCharts ChartSchool — Moving Averages / RSI / MACD — chartschool.stockcharts.com
- Babypips — common chart indicators — babypips.com
Disclaimer
- Educational material. Not investment advice or a recommendation. Trading involves the risk of losing capital.
- The materials are educational. They are not investment advice or a recommendation within the meaning of financial instruments trading regulations. Numbers in examples are illustrative unless a measurement date and source are given.
Who writes this and how we check it
The materials are written and verified by Redakcja Kurs Tradera — the rules are described on about the site: every number has a source, and we show gaps openly. Report a factual error via contact — corrections are described in the content.
Progress is stored only in this browser (localStorage) — there is no account and no copy on the server. Clearing site data will remove it. Manage your data