A return through a CCI extreme is a defined event, not a complete trading system. Here we fix the signal, trend filter, next-quote entry, stop, target, holding limit and transaction-cost allowance before running January–February 2024 EUR/USD data. The SMA-filtered version takes 8 trades and totals −0.265R after a hypothetical 1.2-pip allowance per trade. The interactive journal shows every trade and makes clear which numbers change when you change that allowance.
1. The question this replay tests
Does requiring price and the slope of SMA(50) to agree with a CCI return improve this fixed model? We run two independent variants: CCI return only, and the same return with the SMA filter. Both begin at H4 index 50, use the same risk and exit rules, and allow one position at a time. The periods, levels, filters, holding cap and cost scenarios were fixed before the first replay; no parameter search was performed.
2. Actual quotes, group boundaries and warm-up
The source contains 61 972 original four-decimal EUR/USD minute records from 60 Forexite daily archives. We convert winter CET to UTC and group timestamps in (end − 4 hours, end], ending at 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00 UTC. Labels identify group ends. There are 266 H4 groups, including 17 short or sparse groups; missing prices are never filled.
Execution uses 61 792 observed minute records through the last included H4 endpoint, 2024-02-29 20:00 UTC. The later source-boundary fragment is excluded. Both variants wait until index 50 so current and previous SMA(50), CCI and ATR are available. Broker H4 boundaries may differ. Source timestamps and modeled fills do not establish a broker's actual execution time.
3. Define the fresh CCI(20) return
Typical price is (High + Low + Close)/3. CCI(20) is the latest typical price minus the mean of the current 20 typical prices, divided by 0.015 times their mean absolute deviation from that same mean. This model returns zero when deviation is zero, following the companion guide's convention.
A long signal requires previous CCI ≤ −100 and current CCI > −100. A short requires previous CCI ≥ +100 and current CCI < +100. Current equality does not finish a crossing. A short may cross from above +100 to below zero in one group; we impose no hidden requirement that it remain positive. Signals use completed groups only.
CCI = (TP − mean(TP, 20)) / (0.015 × mean_absolute_deviation) Long: previous CCI ≤ −100 and current CCI > −100 Short: previous CCI ≥ +100 and current CCI < +100
4. Apply the fixed SMA(50) filter
For a long, the signal Close must exceed SMA(50) of Close and the current SMA must exceed its previous value. For a short, Close must be below SMA(50) and the SMA must be falling. Equality fails the filter. The control run ignores these two trend conditions but retains the shared warm-up and all execution rules.
Each variant has its own one-position schedule. Removing a filter can open an earlier position and make a later signal unavailable. Consequently, the filtered trade list is not guaranteed to be a subset of the control list. Compare the complete ledgers rather than pairing trades only by their row numbers.
5. Enter on the next observed minute and freeze risk
At the signal endpoint, the variant must be flat. Entry is the Open of the first observed minute strictly after that endpoint, at most five minutes later. An older signal is discarded; it is not queued for a later group. A signal occurring while a position is open is rejected even if that position exits in the next minute.
Wilder ATR(14) starts with the mean of TR transitions 1–14 at index 14, then uses (previous ATR × 13 + current TR)/14. TR includes gaps from the previous Close. Initial risk is ceil(1.5 × ATR in pips), rounded upward to a whole pip to match the four-decimal quote grid. Freeze this distance at the signal. Place a 1R stop and a 2R target relative to the next-minute entry Open. There is no trailing stop or break-even adjustment.
risk_pips = ceil(1.5 × ATR14_pips) Long: S = E − risk; T = E + 2 × risk Short: S = E + risk; T = E − 2 × risk
6. Resolve gaps, minute touches and the holding cap
For each observed minute, an Open beyond the stop exits at that Open; an Open through the target exits at the target without favorable gap improvement. Next, if the holding cap is due, exit at Open. Otherwise inspect the minute High and Low: touching a level counts; if both levels occur in the same minute, assume the stop first. Entry-minute touches also count. Stop/target timestamps identify a minute record, not an observed execution second.
The cap is the first observed minute strictly after the sixth H4 endpoint following the signal. Six observed groups can span more than 24 elapsed hours across a market closure. If a position survives the study boundary, close at the last included minute Close and flag sample_end. This sample has no such exits and no both-level minutes. The model has no signal-based exit, scaling or simultaneous positions within a variant.
7. Separate transaction allowance from observed costs
We deduct a hypothetical round-trip allowance once per closed trade: 0.0, 1.2 or 2.4 pips. Net R = (gross pips − allowance pips)/initial risk pips. The journal also permits 0.0–5.0 pips in 0.1 steps. Changing it updates net accounting only; the trades, entry quotes, stop and target remain fixed.
The allowance is not a reconstructed spread or commission. No historical Ask, spread, slippage or broker fills are supplied, and holding financing is excluded. A weekend position could therefore incur an additional unmodeled cost. A live evaluation must supply its own execution and financing data; these results are after the selected transaction allowance, not after every possible trading cost.
8. Read the complete two-variant result
At 1.2 pips, the unfiltered run takes 19 trades, of which 7 have positive net R: −32.8 net pips and −1.244631R. The filtered run takes 8 trades, of which 3 are positive: +11.4 net pips but −0.264814R. The filter reduces the R loss in this sample; it does not produce positive R expectancy.
For the filtered run, profit factor is 0.912031 and maximum closed-trade drawdown is 1.187438R at that allowance. Without the allowance its sum is +0.024868R; at 2.4 pips it is −0.554497R. These are closed-trade model statistics, not intratrade drawdown, an account percentage return or a forecast.
| Rule set | Round-trip transaction allowance (pips) | Closed trades | Trades with positive net R | Net pips | Sum of net R | Profit factor in net R | Maximum closed-trade drawdown (R) |
|---|---|---|---|---|---|---|---|
| CCI return only | 0.0 | 19 | 8 | -10.0 | -0.564621 | 0.916723 | 2.307594 |
| CCI return only | 1.2 | 19 | 7 | -32.8 | -1.244631 | 0.826845 | 2.614899 |
| CCI return only | 2.4 | 19 | 7 | -55.6 | -1.924642 | 0.747473 | 2.947846 |
| CCI return + SMA(50) | 0.0 | 8 | 3 | 21.0 | 0.024868 | 1.008830 | 1.060345 |
| CCI return + SMA(50) | 1.2 | 8 | 3 | 11.4 | -0.264814 | 0.912031 | 1.187438 |
| CCI return + SMA(50) | 2.4 | 8 | 3 | 1.8 | -0.554497 | 0.826945 | 1.314532 |
9. Why positive pips can accompany negative R
Adding pips assigns the same weight to each pip. Adding R divides each trade by its own initial stop distance. Here the filtered risk distances vary from 28 to 47 pips, so those two sums need not have the same sign. A +11.4-pip sum is not evidence of a positive fixed-risk result when the corresponding sum is −0.264814R.
One R equals the initial stop distance of that trade. We do not infer an account balance, a percentage return, lot rounding, compounding or portfolio exposure. Those require a separate sizing model. Profit factor in the table is calculated from positive versus negative net R; drawdown is the decline from the cumulative closed-R peak, starting at zero.
10. Inspect month splits and rejected signals
At 1.2 pips, the filtered run has 4 January-entry trades totaling −0.073121R and 4 February-entry trades totaling −0.191694R. These are descriptive entry-month groups, not an out-of-sample split. A position may exit in a different month or remain open across a weekend.
Across the full history there are 31 fresh return events per variant. Five precede the shared eligibility point. The filtered run accepts 8, rejects 14 for trend and 4 while busy. The control accepts 19, rejects 6 while busy and 1 because the next quote is too late. Rejections have a fixed priority, so these counts describe the declared processing order.
| Entry month | Closed trades | Sum of net R |
|---|---|---|
| 2024-01 | 4 | -0.073121 |
| 2024-02 | 4 | -0.191694 |
11. Follow two examples chosen by chronology
The first filtered trade signals a short at 2024-01-22 00:00 UTC: CCI moves from 128.148148 to 98.209128, with a falling SMA(50). Entry is 1.0890 at 00:01 UTC. ATR is 20.280309 pips, giving a 31-pip risk, stop 1.0921 and target 1.0828. The holding cap exits at 1.0876 on 2024-01-23 00:01 UTC: +14 gross pips and +0.412903R after 1.2 pips.
The first February-entry filtered trade opens a short at 1.0802 on 2024-02-02 16:01 UTC, with 47-pip risk, stop 1.0849 and target 1.0708. Six observed groups span the weekend; the cap exits at 1.0754 on 2024-02-05 12:01 UTC. The modeled result is +48 gross pips and +0.995745R after the allowance, before financing. Both charts were selected by chronology, not by profit. The journal includes all five filtered losers as well.
12. Inspect every trade and change the transaction allowance
Start with a rule set and an allowance. The totals describe that entire variant; the trade selector and Previous / Next choose one row of its journal. The chart marks that row's fixed E, X, S and T. Changing the allowance recalculates net values and leaves trade selection and model fills unchanged.
The number field changes a hypothetical transaction allowance in pips. It does not move an entry or stop. Use the trade date to identify what you are inspecting. On narrow screens, scroll the chart or journal horizontally; the page itself stays within the screen.
Complete selected variant
- Closed trades
- —
- Trades with positive net R
- —
- Net pips
- —
- Sum of net R
- —
- Profit factor in net R
- —
- Maximum closed-trade drawdown (R)
- —
Selected trade details
- Entry minute record (UTC)
- —
- Exit minute record (UTC)
- —
- Direction
- —
- Entry quote
- —
- Exit quote
- —
- Fixed stop: S
- —
- Fixed target: T
- —
- Initial risk (pips)
- —
- Exit rule
- —
- Gross pips
- —
- Selected trade: net R
- —
Show the signal, minute record and net-R calculation
- Completed signal-group end (UTC)
- —
- Previous CCI(20)
- —
- Signal CCI(20)
- —
- Signal SMA(50) of Close
- —
- Previous SMA(50)
- —
- Signal ATR(14), pips
- —
- Sixth following H4 endpoint (UTC)
- —
- Exit-minute quote OHLC
- —
Net-R calculation
Show every trade in this variant
| Trade number | Direction | Entry minute record (UTC) | Exit minute record (UTC) | Exit rule | Gross pips | Selected trade: net R |
|---|
13. What to validate before using the rule elsewhere
The independent replay agrees on all signal decisions and 27 trades across the two variants. That checks implementation, not trading merit. Eight filtered trades and two months cannot establish a durable edge. Next evidence would require frozen rules on additional periods and feeds, observed execution costs and financing, realistic sizing and a separate forward test. Do not retune this sample's threshold or filter and present the revised result as independent confirmation.
Frequently asked questions
Did the SMA filter make this strategy profitable?
At 1.2 pips the filtered run totals −0.264814R across 8 trades, compared with −1.244631R across 19 control trades. It reduces the R loss in this sample but does not establish a positive expectancy.
Why are net pips positive while net R is negative?
Pips have equal weight, while R divides each trade by its own 28–47-pip initial risk. The filtered +11.4 net pips and −0.264814R describe different normalizations.
Does changing the allowance rerun entries?
No. It changes only the net accounting of the same recorded trades. The base comparisons use 0.0, 1.2 and 2.4 pips; historical spread and financing are not reconstructed.
Are the displayed exit times exact broker fills?
No. Stop/target times identify the source minute record. The model handles gaps and assumes stop first if both levels occur in one minute. Its quotes do not reveal tick order or actual broker execution.
Data, timing and reproducibility
The download preserves the 61 972 source minute records and provenance for 60 original Forexite archives, including URLs and original SHA-256 hashes. Source OHLC retain four decimal places. This release verified the saved source package's internal hashes and reproduced the calculation from its unchanged minute CSV.
The replay uses 61 792 minute records through 2024-02-29 20:00 UTC, with 266 H4 groups and 17 short or sparse groups. It supplies all signals and rejection reasons, every trade in both variants, fixed protocol, indicator history and independent numerical checks. Nothing is presented as an observed Ask or historical spread.
The rules were frozen before the first replay. The ZIP includes offline reproduction and a separate Decimal70, minute-by-minute verification. The public CSV lists all 27 trades across the two independent variants. These are educational model records, not a combined portfolio or a broker statement.
- All trades from both variants (CSV)
- Minute quotes, fixed rules, signals and offline reproduction (ZIP)