Trading practice
Indicator calculation practice
Calculate SMA, EMA and RSI, separate MACD components, and apply a precise completed-bar crossover definition.
6 exercises in this set. No sign-up required.
Before you begin
The inputs are hypothetical completed observations or explicitly supplied smoothed values. Use the stated seed and update convention. Correct indicator arithmetic describes the inputs; it does not establish a profitable entry, an optimal setting or an independent prediction.
Enable JavaScript to check answers and reveal scenarios interactively. The answer explanations remain available below without it.
0 of 6 exercises reviewed on this visit
Exercise 1 · Hypothetical example
Calculate the five-period SMA after the sixth close arrives. Enter price units to two decimal places.
Six consecutive hypothetical hourly closes, oldest first, are 100, 102, 101, 103, 104 and 110 price units. Calculate the arithmetic mean of the latest five completed closes. Every observation has equal weight inside that five-close window.
Read the 6 displayed observations as a table
Original hypothetical data. Price units follow the scenario. Observation numbers show sequence, not elapsed time. Only the initial observations are included.
| Observation | Close |
|---|---|
| 1 | 100 |
| 2 | 102 |
| 3 | 101 |
| 4 | 103 |
| 5 | 104 |
| 6 | 110 |
Worked explanation
Latest five closes: 102 + 101 + 103 + 104 + 110 = 520. Five-period SMA = 520 ÷ 5 = 104.00. The initial 100 is excluded. This example changes because one observation enters and another leaves; it does not imply that the next price must stay above the average.
Exercise 2 · Hypothetical example
Calculate the updated five-period EMA. Enter price units to four decimal places.
The previous five-period EMA is supplied as exactly 102 price units. The next completed hypothetical hourly close is 110. Use the coefficient α = 2 ÷ (5 + 1), with new EMA = previous EMA + α × (new close − previous EMA). The supplied seed is part of the exercise; do not replace it with a different initialisation.
Worked explanation
α = 2 ÷ 6 = 1/3. New EMA = 102 + (110 − 102)/3 = 104.666666… , which rounds to 104.6667. A different seed or warm-up history can produce a different displayed EMA. Matching a period label alone does not establish identical inputs or calculations.
Exercise 3 · Hypothetical example
What is the RSI, and what does this calculation establish?
For a hypothetical completed observation, the already-smoothed average gain is 1.5 price units and average loss magnitude is 0.5. Use RS = average gain ÷ average loss and RSI = 100 − 100 ÷ (1 + RS). No future prices or trade-performance evidence are supplied.
Worked explanation
RS = 1.5 ÷ 0.5 = 3. RSI = 100 − 100 ÷ (1 + 3) = 75. The conventional 70 reference level is exceeded, but that does not supply entry timing, invalidation, costs or evidence of an edge. The result also depends on how the smoothed inputs were initialised and updated.
Exercise 4 · Hypothetical example
After the next close falls by 3 price units, what is the updated RSI to two decimal places?
A hypothetical 14-period Wilder calculation has previous average gain 2 and previous average loss magnitude 1. The next completed close-to-close change is −3. Update each average as (previous average × 13 + current non-negative gain or loss magnitude) ÷ 14. The current gain is 0 and current loss magnitude is 3.
Worked explanation
New average gain = (2 × 13 + 0) ÷ 14 = 26/14. New average loss = (1 × 13 + 3) ÷ 14 = 16/14. RS = (26/14) ÷ (16/14) = 1.625. RSI = 100 − 100/(1 + 1.625) = 61.904761… , or 61.90. This recursive update is different from discarding the old history and using only the last change.
Exercise 5 · Hypothetical example
Which interpretation correctly separates the MACD line and histogram?
At one hypothetical completed observation, the fast price EMA is 101.0, slow price EMA 102.0 and supplied signal line −1.4, all in the same arbitrary price units. Use MACD = fast EMA − slow EMA and histogram = MACD − signal. The signal value comes from its existing smoothed history; it is not recalculated from this one snapshot.
Worked explanation
MACD = 101.0 − 102.0 = −1.0. Histogram = −1.0 − (−1.4) = +0.4. A positive histogram can therefore coexist with a negative MACD line. Neither the indicator distance nor its sign states the size, timing or net result of a hypothetical trade.
Exercise 6 · Hypothetical example
Has this precisely defined upward crossover occurred at the latest close?
Define an upward crossover only when fast average was at or below slow average on the previous completed hourly bar and is strictly above slow on the current completed hourly bar. Previous fast/slow values were 100/101. Current fast/slow values are 102/102. These supplied averages are hypothetical and already calculated.
Worked explanation
Previous test: 100 ≤ 101 is true. Current test: 102 > 102 is false. Both must be true, so no upward crossover is recorded now. If a later completed bar first meets the condition, its event time belongs to that later bar; it cannot be moved back to this equality or an earlier intrabar touch.
Prepared by InsomniCapital, checked 2 October 2026. Original hypothetical exercises; source explanations and limitations are available in the companion guide. Risk disclosure.