A large candle can be the start of movement or the end of the available opportunity. This model measures it against volatility known before it formed, waits for one modest continuation close and rejects an expensive first quote. It does not select a later, prettier expansion. Every example is invented research data.
1. What does this model test?
This hypothesis studies the transition from a quiet price sequence to directional expansion. It has no frozen range boundary to break, no band re-entry and no two-bar countertrend pullback. Unlike the MACD/ATR first-turn strategy, ATR controls candidate quality and the projected target, while EMA supplies direction. A strong-looking candle alone is insufficient; no measured edge or ready Expert Advisor is claimed.
Use continuous scheduled M5 Bid OHLC and completed Close-based indicators. The fictional EURUSD contract has pip=0.0001; point=tick=0.00001. Prices must respect the actual executable tick and contract. Real SELL validation needs observed paired Ask data; a current spread added to historical Bid cannot reconstruct historical Ask. These rules are a reproducible research baseline, not live settings.
2. Specify EMA, true range and the ATR mean
Seed EMA20 at k19 with the first twenty closes; thereafter use EMA20(k)=[2×Close(k)+19×EMA20(k−1)]/21. True range starts at k1: TR(k)=max(High−Low,abs(High−PreviousClose),abs(Low−PreviousClose)). Define ATR14_SMA(k)=mean(TR(k−13)..TR(k)) from k14. This is an arithmetic mean, not a Wilder recurrence. EMA is unavailable before its seed; zero or unavailable ATR blocks classification.
Use full stored values before display rounding. For j with three earlier EMA values, a quiet bar satisfies all three conditions: TR_j<=1.10×ATR_j; abs(EMA_j−EMA_(j−3))<=0.10×ATR_j; abs(Close_j−EMA_j)<=0.50×ATR_j. Each uses that bar's completed ATR and EMA. In MT4, ma_shift is chart offset, while the final shift selects the historical buffer value; shift 0 is forming. Verify timestamped buffers and initialization before claiming native equivalence.
3. Arm with six quiet bars; consume the first departure
Count consecutive quiet bars. At six, arm the model; every further quiet bar updates the latest anchor Q and freezes B=ATR14_SMA(Q). The first following nonquiet bar is S and consumes the opportunity immediately, even if it is too small, too large, outside hours or directionless. There is no search for the first qualifying large candle. A continuing quiet sequence only updates Q; it does not produce entries.
After S, require six fresh consecutive quiet bars to rearm. Track this state outside entry hours and while positions or unresolved requests block entry. A rejected quote, a later large candle or a new clock hour cannot restore the old opportunity. Missing/invalid bars invalidate pending confirmation and hold entries; rebuild the continuous history and fresh quiet state. After restart reconcile ownership and replay state without transmitting historical signals.
4. Qualify the first expansion against the old baseline
At S require 1.80<=TR_S/B<=2.40; abs(Close_S−Open_S)/TR_S>=0.75. The open must be close to Q: abs(Open_S−Close_Q)<=0.10×B. BUY needs a bullish body, close above its EMA20 and EMA20 above its value three bars earlier; SELL reverses those comparisons. Equality in directional comparisons fails. ATR_S is a diagnostic; it never replaces the frozen B denominator.
Require a close near the directional extreme: BUY: (Close_S−Low_S)/(High_S−Low_S)>=0.80; SELL: (High_S−Close_S)/(High_S−Low_S)>=0.80. Both S and the next scheduled C must close within [07:00,10:00) UTC, using a date-verified broker-to-UTC conversion. The cap deliberately rejects shock candles. These hours are not a news filter, and all numerical thresholds are unoptimized assumptions.
| UTC time | EMA20 | ATR, pips | Frozen B, pips | TR / B |
|---|---|---|---|---|
| 07:55 / Q | 1.10000000 | 4.000000 | 4.000000 | 1.00 |
| 08:00 / S | 1.10006095 | 4.285714 | 4.000000 | 2.00 |
| 08:05 / C | 1.10012086 | 4.114286 | 4.000000 | 0.40 |
5. Freeze a body-based stop and a volatility target
At S, BUY freezes S_bid=floor_tick((BidOpen_S+BidClose_S)/2−0.2 pip); T_bid=floor_tick(BidClose_S+3×B). SELL freezes S_ask=ceil_tick((AskOpen_S+AskClose_S)/2+0.2 pip); T_ask=ceil_tick(AskClose_S−3×B). Round stops outward and targets inward. SELL uses its actual Ask endpoints; the fixture's constant spread is fictional. Missing required Ask observations blocks entry.
The stop is based on the S body midpoint, not an ATR stop or the S wick. The target projects three units of the pre-expansion ATR from S's proper-side close, not three times the entry risk. Neither level changes with C, a new ATR value, the quote or fill. They are future protection/objectives; the stop is not treated as active during the formation of S itself.
| Side | Stop | Target | Body midpoint |
|---|---|---|---|
| BUY | 1.10030 | 1.10184 | 1.10032 |
| SELL | 1.10116 | 1.09962 | 1.10114 |
6. Allow only one modest continuation close
C is exactly the next scheduled M5 close. First cancel if C touches either frozen exit: BUY checks Bid low at or below S or high at or above T; SELL checks Ask high at or above S or low at or below T. Then require a same-direction body, close on the correct side of its own EMA20 and the same strict three-bar EMA slope. A missing C cannot be replaced.
With direction d=+1 for BUY; d=−1 for SELL, require 0<d×(BidClose_C−BidClose_S)<=0.25×B; TR_C<=B. Thus zero follow-through fails, and excessive extension also fails. C need not be an inside bar or break a historical range. No pending order, second confirmation candle or later renewed expansion repairs a failure. Each later opportunity needs its own six-bar quiet reset.
7. Evaluate the first observed quote once
At the first observed symbol quote after C's scheduled close, completed C data must already be available. Require positive ordered Bid/Ask and spread<=1.0 pip; abs(Bid_ref−BidClose_C)<=0.5 pip; own_symbol_receipt_age<=250 ms. Receipt age is a measured local interval, not network latency inferred from a server timestamp. A failed first quote consumes the candidate; a later cheaper quote is irrelevant.
Send at most one initial protected market request by C+1 second, inclusive. No timely quote means expiry. Immediately recheck current quote, receipt age, net ratio, the same first-sized volume, cash limits, ownership, margin, permissions, minimum lot and broker stop constraints. If attached fixed SL/TP cannot be sent, skip. Do not resize, widen levels, delay for improvement or replace the market request with a pending order.
8. BUY: old volatility, new price information
In the fixture, Q closes at 07:55, S at 08:00 and C at 08:05 UTC. Q has EMA20_Q=1.10000; B=0.00040=4 pips. S has O/H/L/C=1.10000/1.10072/1.09992/1.10064; TR_S=8 pips; TR_S/B=2.00; body/TR=0.80. Its EMA20 is 1.10006095; ATR_S rises to 4.285714 pips, but B stays four.
C closes at 1.10069, continuing by 0.5 pip with TR 1.6 pips. Frozen exits are S_bid=1.10030; T_bid=1.10184. The first quote is 08:05:00.100; Bid/Ask=1.10069/1.10077; F_plan=1.10079. A protected request at .300 has receipt age 200 ms; the server fills at 1.10078 at .450 and acknowledges at .500. A planning allowance is not the actual fill.
9. SELL: same Bid analysis, separate Ask exits
The independent SELL branch mirrors Bid candles; its EMA20 slope is negative. S's Bid open/close are 1.10138/1.10074, while the paired Ask endpoints are 1.10146/1.10082. Therefore S_ask=1.10116; T_ask=1.09962. Indicators still use Bid; Ask defines SELL protection and exit tests. The same ATR magnitude has no directional meaning.
C's Bid close is 1.10069. The first Bid/Ask again equals 1.10069/1.10077, but SELL plans F_plan=1.10067 and fills at 1.10068. The Ask target 1.09962 corresponds to Bid 1.09954 only under the invented constant spread. Equal directional costs here are engineered symmetry, not evidence of equal live performance or a reliable Ask reconstruction.
10. Keep independent failures separate
In first_nonexpansion, the first nonquiet S has TR_S/B=1.60, below the floor. A larger candle at 08:10 cannot replace it: no six-bar reset occurred. In oversized_expansion, TR_S/B=2.80 exceeds the cap. In late_confirmation, C closes exactly at S's 1.10064; zero continuation fails, and the 08:10 close at 1.10069 is too late.
In bad_first_quote, Bid 1.10069 and Ask 1.10080 give spread 1.1 pips. Net W/L still exceeds 1.50, but the spread gate fails; the better quote at .200 does not revive it. These are different constructed branches. Rejected rows contain no entry request, traded volume or realised P&L. Diagnostic quote references, costs and hypothetical sizes are not fills or zero-return trades.
11. Require enough net room at the entry price
Assume a USD account, EUR 100,000 per lot and pip_value=$10/lot; equity=$10,000; new_risk=0.25%=$25; aggregate_risk<=0.50%=$50. F_plan includes 0.2 pip adverse entry: Ask plus the allowance for BUY, Bid minus it for SELL. Reserve a further 0.2 pip exit slippage and linear 0.7-pip round-trip commission, without minimum/other fees: c=0.9 pip. BUY uses L=(F_plan−S_bid)/pip+c; W=(T_bid−F_plan)/pip−c; SELL reverses the price distances. Spread is already represented by the sides.
Require positive L/W and W/L>=1.50. The normal quote gives L=5.8; W=9.6; W/L=1.6551724. With no other exposure, lots=floor_step(min(25,50−existing_risk)/(L×10),0.01)=0.43: planned risk $24.94 and target $41.28. An alternative first quote 1.10073/1.10081 still passes spread and displacement, but gives L=6.2; W=9.2; W/L=1.4838710. Reject at any size. Unknown aggregate risk or below-minimum volume blocks entry; no adding or hedging an owned position.
| Quote | Loss, pips | Reward, pips | Net W/L | Result |
|---|---|---|---|---|
| 1.10069 / 1.10077 | 5.8 | 9.6 | 1.6551724 | Pass |
| 1.10073 / 1.10081 | 6.2 | 9.2 | 1.4838710 | Fail |
12. Manage full exits and the independent time limit
Close the full BUY on Bid<=S_bid OR Bid>=T_bid, or SELL on Ask>=S_ask OR Ask<=T_ask. Otherwise seek a full exit on the first valid quote at or after min(C+15 minutes,10:00 UTC), counted from C, not the fill. Reconcile an already executed broker exit before another close request. Management does not wait for entry spread or indicator gates. No trailing, partial close or target extension is included.
The target branches reach their proper-side threshold at 08:10:10 for 10.6−0.7=9.9 net pips; $42.57. Unused reserves are not fees. The gap branch jumps from Bid 1.10060 to 1.09990 and exits there for −9.5 net pips; −$40.85, beyond the plan. The time branch's first due quote is 08:20:00.200; fill at .350 at Bid 1.10055 gives −3.0 net pips; −$12.90. Planning risk does not cap realised loss.
| Result | Net pips | Net USD |
|---|---|---|
| BUY / Target | 9.9 | 42.57 |
| SELL / Target | 9.9 | 42.57 |
| BUY / Gap | -9.5 | -40.85 |
| Exit / 15 min | -3.0 | -12.90 |
| Request / 128 | 9.9 | 42.57 |
13. Reconcile unknown outcomes before another request
In timeout_reconciled, the request at 08:05:00.300 fills on the server at .450, returns error 128 at 08:05:01 and is found protected at 08:05:02. Timeout does not prove failure. Hold new entries and reconcile owned positions, pending orders and history using identifiers, symbol, direction and volume. A comment is not an idempotency guarantee. Never send a blind replacement entry.
If a verified owned fill has missing or wrong fixed protection, the declared fault response is one full market-exit request on a valid quote when permissions allow, then alert and reconcile rejected or unknown outcomes. Do not repeat closes blindly or affect unrelated positions. Restore ownership, accepted protection, unresolved requests and quiet-reset state after restart. Entry holds do not disable management of existing exposure.
14. Know which market regimes can defeat it
A quiet sequence can precede a false expansion, and a large directional body can exhaust movement. A small next-bar continuation does not prove follow-through will persist. EMA lags and reuses prices already represented in the pattern; ATR measures scale, not direction or independent confirmation. The body-midpoint stop can be close to ordinary noise. Execution costs, variable Ask paths, broker limits and gaps can invalidate a clean Bid chart.
This baseline has no automatic news blackout. A news-aware variant must predeclare the full blackout, spread-recovery and fresh-signal policy, including consumed/reset states. Compare missed opportunities and actual costs, not only losses. Different smoothing, quiet conditions, expansion caps, clocks or exits are separate variants; do not change them after seeing a result.
15. Reproduce mechanics before studying performance
The three CSVs contain 822 bars; 2,010 events; 10 independent branches, with five rejections and five alternative entries. They are constructed demonstrations, not market history, simultaneous positions or a win-rate sample. After entry, the declared one-second feed plus explicit endpoint quotes is complete. Analytical candle-close markers are not executable quotes. Local millisecond times are invented measurements, not native MT4 server precision. There is no financing or other charge.
Independently recompute EMA/TR/ATR, each quiet predicate, the latest Q and first consumed departure. Verify the pre-expansion B, S quality, frozen proper-side exits, one C, first quote, full costs, volume and chronological triggers. Include five versus six fresh quiet bars, zero ATR, gaps, equality limits, missing C, stale quotes, expiry, unknown exposure, restart and timeout. Market research then needs unseen periods, observed Bid/Ask and actual execution constraints. These CSVs establish mechanics only.
Download fictional M5 bars (CSV)
16. Use a finite execution checklist
Validate continuous closed data and reconciled ownership. Count six quiet bars and update Q while quiet continues. Consume the first nonquiet S before quality and time gates; compare it with B frozen at Q. Freeze the body-based stop and three-B target. Check only scheduled C, visited exits first, then strict direction, limited continuation and TR. Evaluate the first quote once and calculate positive net room and a valid fixed volume.
Recheck execution and cash constraints before one protected request; reconcile the outcome and manage full exits with the separate clock. After failure, wait for six new quiet bars rather than reviving the old candle. Keep all rejections, unknown outcomes and costs in the log. This policy makes the hypothesis testable; it does not establish positive expectancy, a guaranteed loss ceiling or suitable live settings.
Frequently asked questions
Does a rising ATR tell the model to buy?
No. ATR measures movement magnitude. Direction comes from the strict S/C body, EMA side and EMA slope tests. The denominator B is fixed before S, so S cannot redefine the scale used to qualify itself.
Can the first nonquiet candle be ignored if it is too small?
No. The first departure consumes the attempt before quality checks. A later larger candle needs six fresh consecutive quiet bars and its own new opportunity.
Is the stop an ATR multiple or the setup wick?
Neither. It is S's proper-side body midpoint plus the declared outward buffer. The target projects three pre-expansion ATR units from S's proper-side close; it is not three times entry risk.
Must confirmation be an inside bar or a range breakout?
No. Exactly the next close must continue strictly in direction within the cap, with a same-direction body, limited TR and EMA agreement. Touching a frozen exit first cancels it.
Can a smaller lot rescue a costly entry?
No. Under the declared linear fees, volume changes cash exposure but not W/L. A first quote below the net ratio floor is rejected even when spread is acceptable.
Are the CSV outcomes verified strategy performance?
No. They are independent invented mechanics cases. They cannot establish expectancy, win rate or live suitability; the gap example also shows that planned risk is not a loss cap.
Sources and research notes
Official references describe moving averages, true range, indicator shifts and order parameters. The finite seeds, quiet reset, thresholds, hours, exits and prices here are original research assumptions, not vendor recommendations or validated trading settings.
- MetaTrader 4: moving average definitions
- MetaTrader 4: true range and ATR
- MQL4: protected market-order parameters
Educational research hypothesis. Invented prices and execution; no verified performance, live settings or guaranteed loss limit.