A small range becomes useful for research only when its boundaries, observation window and first opportunity are fixed before the breakout. This M5 template separates a closed signal from an executable entry and keeps cancellations in the record.
1. What this 5-minute scalping strategy tests
This 5-minute Forex scalping strategy tests a specific idea: a brief consolidation may be followed by a tradable continuation beyond a fixed boundary. Three completed M5 Bid candles define the range; the first later close outside it chooses a direction. A wick alone cannot trigger entry. The signal timeframe is five minutes, while the planned maximum holding period is ten minutes after the actual fill, subject to an executable exit being available.
This is an original research specification, not an established profitable system or a set of optimized parameters. All examples are invented to make the rules reproducible. It differs from the M1 EMA pullback strategy: there is no EMA trend gate, pullback band or reaction pair. It also does not use London's first opening range, a daily pivot or a retest. The scalping guide explains the wider role of timeframes and costs.
2. Freeze the instrument, clock and settings
Use illustrative EUR/USD with 1 pip = 0.0001, point and executable price tick 0.00001. Signals use Bid OHLC. Define the research entry window as 09:00–11:00 UTC, with half-hour slots starting at 09:00, 09:30, 10:00 and 10:30. These hours are a sample definition, not the best session. Document the historical conversion from broker candle times to UTC; daylight-saving changes cannot be ignored.
The first three M5 candles of each slot form the range. Require width W between 4 and 8 pips inclusive and a nonempty common intersection of their high-low intervals. Observe only the next two M5 candles for a breakout. The first outside close must clear the boundary by at least 0.3 pip and have a body in that direction. The fixed stop buffer is 0.5 pip; the target is two range widths beyond the breakout edge. Maximum planned entry distance from that edge is 2 pips.
Entry requires spread at most 0.8 pip, documented quote age at most 2 seconds and a request strictly before 10 seconds have elapsed since the signal's nominal close. Entry reserve is 0.2 pip, round-trip commission 0.6 pip and future adverse exit reserve 0.4 pip; minimum planned net reward/risk is 1.1. Keep one position at a time and at most one candidate and request per slot. These are research inputs. The pairs and cost-filters guide explains why they cannot be assumed valid for another contract.
| Setting | Illustrative value | Interpretation |
|---|---|---|
| Range | 3 M5 candles; W = 4–8 pips | Common overlap; freeze U/L/W after formation |
| Opportunity | 2 monitoring candles; clearance 0.3 pip | First outside close only; directional body; two-edge sweep cancels |
| Entry | 0.8 pip / 2 seconds / <10 seconds / 2 pips | Maximum spread, quote age, exclusive request window and edge distance |
| Fixed exits | 0.5-pip stop buffer; target 2W beyond edge | BUY levels on Bid; SELL levels on Ask |
| Cost gate | 0.2 / 0.6 / 0.4 pip; net ratio ≥ 1.1 | Entry reserve / round-trip commission / future exit reserve |
| Exposure | 1 position; 1 candidate/request per slot | Request time exit 10 minutes after actual fill |
3. Build one range from information already available
For the 09:00 slot, take exactly the candles opening at 09:00, 09:05 and 09:10. After their completion, freeze U as the highest high, L as the lowest low and W = U − L. Common overlap requires max(low1, low2, low3) ≤ min(high1, high2, high3). Equality counts as an intersection. The width condition is separate; overlap alone does not make a narrow or wide range eligible. Do not select a more attractive set of candles later.
The fictional candles have these Open/High/Low/Close values: 09:00 = 1.10020 / 1.10060 / 1.10010 / 1.10040; 09:05 = 1.10040 / 1.10050 / 1.10000 / 1.10020; 09:10 = 1.10020 / 1.10055 / 1.10005 / 1.10035. Thus U = 1.10060, L = 1.10000 and W = 6 pips. Their common intersection is 1.10010–1.10050. The range becomes knowable only after 09:15, not at 09:10 when the last candle opens.
Activate only if flat at the slot's start and continuously observing through formation. The first observed quote after formation must arrive strictly before 09:15:10 and meet the documented freshness requirement. Otherwise cancel the slot. Missing candles, an invalid OHLC record or a restart halfway through the slot also cancels it. Keep U, L and W unchanged through the remaining opportunity; later highs are breakout evidence, not permission to redraw the range.
4. The first outside close consumes the opportunity
Observe the completed candles opening at 09:15 and 09:20, with nominal closes at 09:20 and 09:25. A candle closing exactly on U or L is still inside. A wick beyond an edge with the close inside leaves the opportunity open for the second candle, provided it does not trigger the two-edge cancellation below. If both candles close inside, the slot ends with no breakout. A third candle cannot rescue it.
The first close strictly above U or below L is the only candidate. For BUY require Close ≥ U + 0.3 pip and Close > Open; for SELL require Close ≤ L − 0.3 pip and Close < Open. A weaker first outside close consumes the slot and fails. Do not ignore it and choose the next larger candle. Equality passes the 0.3-pip clearance, but fails the strict body condition.
For the BUY example, the 09:15–09:20 candle has Open 1.10035, High 1.10075, Low 1.10025 and Close 1.10064. It is bullish and closes 0.4 pip above U, clearing the required 1.10063 level. This confirms a candidate only when the completed candle is actually observed. It does not establish that a trade could have filled at its historical close.
5. Two-edge sweeps and invalidation
Before interpreting either observation candle's close, cancel the slot if that candle has Low ≤ L and High ≥ U. It has touched both frozen edges in one M5 bar; this version rejects that ambiguous path even if its close looks convincing. This check has priority over the breakout test. The ranges of the formation candles do not trigger this monitoring rule.
Once a candidate exists, its direction, stop and target are fixed. For BUY the stop is L − 0.5 pip and target U + 2W, both on Bid; for SELL the stop is U + 0.5 pip and target L − 2W, both on Ask. A breach of the relevant protective or target level before entry cancels the candidate. No second direction, replacement range or widening of the original boundaries is permitted. A stop is an exit instruction, not a guarantee of maximum loss.
6. Separate candle time, quote time and request time
Evaluate only the first observed current-symbol paired Bid/Ask quote after the signal candle completes. It must still satisfy Bid ≥ U + 0.3 pip for BUY or Bid ≤ L − 0.3 pip for SELL. Require valid positive quote values with Ask ≥ Bid, legal tick increments, spread within 0.8 pip and quote age within 2 seconds under a documented measurement. Local receipt age and server timestamps are different clocks; do not subtract unrelated clocks to manufacture freshness.
The request must be sent before the signal's nominal close plus 10 seconds, before the half-hour slot ends and within 09:00–11:00 UTC. Equality at a deadline is too late. With a nominal close of 09:20:00, a quote at 09:20:02 and request before 09:20:10 may qualify. A first quote or request at 09:20:10 fails. A second-candle signal closing at 09:25 can still use its own ten-second window; it does not authorize another observation candle.
Failure at the first quote cancels the candidate; waiting for a cheaper spread or better price would create another strategy. Send at most one request after all gates and sizing pass. An intervening quote that invalidates a condition before submission also cancels the entry. A later fill is an execution event, not evidence that the original quote or deadline was valid. The slippage and latency guide explains order reconciliation when the response is uncertain.
7. Price the fixed plan before choosing volume
Define planned entry E* as current Ask + 0.2 pip for BUY or current Bid − 0.2 pip for SELL. Require directional distance E* − U for BUY or L − E* for SELL to be between zero and 2 pips inclusive. This reserve is an allowance for calculation, not a guaranteed fill cap. Stop and target must remain on the correct sides of E* and the current exit quote. Check tick normalization, minimum stop distances, allowed volume and margin. If the exact plan is not permitted, reject it rather than changing its geometry.
From E*, calculate gross stop distance and gross target distance. Add commission plus future exit reserve, 1.0 pip in this example, to planned loss; subtract them from potential gain. Require positive values and potential net gain / planned net loss ≥ 1.1. Only then calculate size. Use protection with the entry request only where that workflow is supported; do not silently turn this into an unprotected-entry procedure. Broker restrictions and execution modes must be verified for the actual account.
8. Worked BUY with executable quote sides
Keep U = 1.10060, L = 1.10000 and W = 6 pips. The signal is the bullish candle closing at 1.10064. Suppose the first decision quote at 09:20:02 is Bid 1.10064 / Ask 1.10070: spread is 0.6 pip, and Bid retains the required clearance. Planned E* = 1.10072, 1.2 pips beyond U. Assume a valid request and an actual BUY fill at the same 1.10072 at 09:20:03. These are fictional events, not a measured fill guarantee.
The fixed Bid stop is 1.09995 and Bid target 1.10180. Gross risk is (1.10072 − 1.09995) / 0.0001 = 7.7 pips; potential gross reward is (1.10180 − 1.10072) / 0.0001 = 10.8 pips. Planned net loss is 7.7 + 0.6 + 0.4 = 8.7 pips; potential net gain is 10.8 − 0.6 − 0.4 = 9.8 pips. The ratio 9.8 / 8.7 ≈ 1.13 passes 1.1.
Spread and the assumed entry deviation are already embedded in distances from the actual Ask fill to the Bid exits. Do not subtract either again. The future exit reserve remains an assumption; a gap or failed close can exceed it. The trading-cost guide distinguishes a planned allowance from a realised ledger.
9. A later executable price can invalidate the same pattern
As an alternative first-quote scenario, use Bid 1.10070 / Ask 1.10076 with the same signal, stop and target. Spread is still 0.6 pip; planned E* is now 1.10078, only 1.8 pips beyond U. Spread and maximum-distance gates pass. But gross risk becomes 8.3 pips and gross reward 10.2 pips. After the same 1.0-pip charge and reserve, planned loss is 9.3 and potential gain 9.2 pips.
The ratio 9.2 / 9.3 ≈ 0.99 fails 1.1, so cancel. Do not move the target, tighten the stop or lower the threshold to make the trade qualify. These are alternative hypothetical first quotes, not two attempts in one slot. Even before costs, a first planned entry above 1.10080 would fail the 2-pip distance limit; exactly 1.10080 still needs every other gate to pass.
10. Size down from the full planned loss
Assume a standard EUR/USD contract of EUR 100000, a USD account and USD 10 per pip per lot. The BUY's 8.7-pip planned loss equals USD 87 per lot. An illustrative USD 25 cash budget gives 25 / 87 ≈ 0.28736 lot. With a 0.01 lot step, round down to 0.28 lot: planned loss is USD 24.36 and conservative target amount is 0.28 × 9.8 × 10 = USD 27.44.
These are calculations, not expected profits or a recommended trade size. Verify actual pip value, volume limits, free margin and any minimum or per-ticket fees. Skip if the rounded size is below the minimum; do not round up. Another account currency requires the appropriate conversion. The position-sizing guide covers that process. A budget does not cap loss during a gap, rejection or operational failure.
11. SELL is not a copy of BUY cash distances
For a separate hypothetical downward breakout, retain the same range. Let the first observation candle have Open 1.10020, High 1.10040, Low 1.09990 and Close 1.09996. It is bearish, has not touched both edges and clears L − 0.3 pip = 1.09997. Assume all timing and account gates pass. At Bid 1.09996 / Ask 1.10002 the spread is 0.6 pip and planned entry is Bid − 0.2 pip = 1.09994, 0.6 pip below L.
Assume an actual SELL fill at 1.09994. The fixed Ask stop is 1.10065 and Ask target 1.09880. Gross risk is 7.1 pips and potential gross reward 11.4 pips. After commission and future exit reserve, planned loss is 8.1 and potential gain 10.4 pips; 10.4 / 8.1 ≈ 1.28 passes. Recalculate volume and margin rather than copying the BUY's size or cash outcomes.
Both signals use Bid candles, but BUY opens on Ask and exits on Bid; SELL opens on Bid and exits on Ask. The levels above deliberately use that convention. A Bid low touching 1.09880 does not prove the SELL target was executable on Ask. Paired quotes and event order are needed to establish exits; a mirrored candle drawing cannot settle the economics.
12. The ten-minute exit starts at the fill
Keep the original stop and target, with no trailing, break-even move or partial close. Unless the position has already closed, request a time exit on the first executable quote at or after ten minutes from the actual fill. Reconcile any protective exit or uncertain order state before sending another action. Preserve quote, request and confirmation order even when timestamps are equal.
The BUY fill at 09:20:03 gives a planned deadline of 09:30:03. If no quote is available until 09:30:05, do not invent a close at the earlier time. Suppose the new quote has Bid 1.10090 and actual BUY exit is 1.10088. The actual fill-to-fill gain is 1.6 pips; after 0.6-pip commission the realised net gain is 1.0 pip, or USD 2.80 at 0.28 lot. Do not deduct the unused planning reserve a second time.
Ten minutes is a requested holding limit, not a guaranteed duration. Existing positions need an exit procedure after the entry window ends. If a new slot begins while a position remains open, skip that entire slot, even if the trade closes shortly afterward. A new slot does not move the old stop, reset its holding clock or authorize an immediate replacement trade.
13. Keep cancellations and execution exceptions in the record
Use different reasons for an ineligible range, missing observation, two-edge sweep, weak first outside close, no breakout, failed quote, expired entry and rejected request. Each consumes or ends the slot according to the rules. At most one candidate and one request are allowed, including a candidate that fails before submission. Do not reverse direction after a failed BUY or reconstruct a range after restarting midway through the slot.
If request status is uncertain, reconcile it against the account before any further action; a timeout does not prove rejection. A confirmed fill outside the admitted plan is an execution exception. Keep available protection and request an orderly exit on the first usable quote under the recorded procedure, without reopening. Record the actual loss or gain and charges. Exceptions do not disappear from the test because they spoil an otherwise tidy illustration.
14. Where the micro-range hypothesis can fail
A common overlap and a six-pip range do not establish stored buying or selling pressure. A small box can be random noise, and a completed breakout can immediately reverse. Fixed boundaries remove one source of hindsight without proving an advantage. The chosen width band, two-candle window and target multiple may be economically weak; they must be evaluated, not described as universally optimal.
Short opportunities can be dominated by spread changes, adverse selection, rejection and delayed quotes. A constant cost deduction cannot reproduce a quote that would cancel the trade in real time. Changing the session, adding a news filter, waiting for a retest or allowing another attempt produces a new version. Record all such variants, including failed experiments, rather than promoting only the most attractive historical line.
15. Test the complete sequence, not only the breakout candles
Replay slot eligibility, the three exact formation candles, activation quote, frozen U/L/W, first outside close, priority of the two-edge rule, first entry quote, gates, size, one request, actual fill and all exits. Keep no-breakout and rejected candidates in their proper denominators. A first-candle failure cannot be replaced by the second candle. Test equality at range edges, the 0.3-pip clearance and the exclusive ten-second deadline explicitly.
Standard MT4 Every tick does not certify recorded historical paired Bid/Ask, actual local receipt age or realistic latency. M5 bars alone cannot resolve stop/target order when both prices appear inside one bar. If the available evidence cannot assess a gate or event order, label it untestable under that dataset. The MT4 scalping-backtest guide details those limitations.
Separate development, validation, untouched historical testing and forward observation chronologically. Report candidates, cancellations, requests, fills, closed outcomes, open exposure, charges, drawdown and execution exceptions. Stress costs and timing through the complete eligibility process. A high modelling percentage or a clean diagram is not a probability of future success, and no profitable backtest is supplied here.
16. Review the evidence before forward observation
Preserve the exact rule version, UTC mapping, original source data, parameter file, slot-by-slot log and unaltered test reports. Each admitted or cancelled candidate should point to its three formation candles, first outside close and first observed quote. Verify that the range never moved and no future candle entered a decision. Keep these educational diagrams separate from monitored trading results.
The forward-validation protocol provides an observation and reconciliation framework. A demo can help verify rule fidelity without establishing identical live liquidity. The appropriate conclusion may be insufficient execution evidence, another controlled test or rejection of the hypothesis. Commercial Expert Advisors require their own documented evidence; this fictional strategy does not establish that any listed EA uses or profits from these rules.
Frequently asked questions
Does M5 mean every trade lasts exactly five minutes?
No. M5 is the signal-candle timeframe. This version requests a time exit ten minutes after actual fill; execution may be later if no usable quote is available.
Can I move the range after another high or low appears?
No. Freeze U, L and W after the three specified formation candles. Later prices supply breakout or cancellation evidence, not replacement boundaries.
Does a wick outside the range qualify?
No. The first outside close must clear the edge by at least 0.3 pip and have a directional body. A monitoring candle touching both frozen edges cancels the slot before the close is assessed.
Can the second breakout candle replace a weak first outside close?
No. A weak first outside close consumes the opportunity. The second observation candle is available only when the first candle did not consume or cancel it.
Why can an entry pass the spread and distance limits but still fail?
The stop and target stay fixed. At planned BUY entry 1.10078, net gain 9.2 divided by planned loss 9.3 is about 0.99, below the illustrative 1.1 threshold.
Is this a profitable backtest or an EA recommendation?
No. All prices and outcomes are fictional teaching examples. The range hypothesis, costs, execution and robustness require independent testing; no verified profitability is claimed.
Sources and research notes
MetaQuotes documents market-order quote sides, price normalization and broker stop restrictions. Those platform mechanics support the execution explanations; they do not validate the original range rules or numerical thresholds. Every price, quote, fill and cash outcome here is fictional. No profitable backtest or broker execution measurement was performed for this article.
Educational research template. All settings, prices, fills and cash outcomes are fictional, not verified results. Forex trading involves risk. A stop, reserve, budget or backtest does not guarantee future performance or a maximum loss.