ForexBestRobots.comCompare EAs →
EN

Scalping indicator combination strategies · Strategy 3

EMA and MACD M5 Forex Scalping Strategy: Timely Zero Cross and Fixed Exits

A complete EURUSD M5 EMA–MACD strategy: a fresh signal cross, timely zero confirmation, protected entry, fixed exits and reproducible execution cases.

EMA20/50 and MACD12/26 with SMA9 signal: a fresh origin, a timely zero cross and one protected entry with fixed exits. All inputs and outcomes are fictional.
EMA20/50 and MACD12/26 with SMA9 signal: a fresh origin, a timely zero cross and one protected entry with fixed exits. All inputs and outcomes are fictional.

A positive MACD reading is not a new event by itself. This strategy first records a fresh main-versus-signal cross on the opposite side of zero, then allows only two later completed bars for a new zero cross. EMA context and main-versus-signal support must survive throughout. A qualified signal still needs an acceptable first quote, adequate net reward and verified fixed protection.

1. Freeze the complete two-stage model

Use EURUSD · M5 · Bid OHLC · Close and a USD account. EMA20/50 supplies a declared price-location context; MACD supplies two different crossing events. M=E12−E26 makes M above zero identical to EMA12 above EMA26 with matching inputs. Counting both is duplicate confirmation. EMA20/50 is a different pair but still reuses the same closes; neither agreement nor delay proves an economic edge.

Allow one owned position or unresolved request per symbol. No averaging, pyramiding, hedge, partial exit, trailing or break-even adjustment. Ignore origins while pending or invested; after a verified exit wait for a later independent origin. Missing required bars terminate an observation: rebuild contiguous history before a fresh event. The fixed UTC and execution framework matches the two preceding strategies so their rules can be compared without silently changing account controls.

2. Calculate EMA, main, SMA signal and OsMA separately

For n=12/20/26/50, seed E_n(n−1)=mean(C[0...n−1]) and apply E_n(k)=(2*C(k)+(n−1)*E_n(k−1))/(n+1). First values are k11/k19/k25/k49. Define M=E12−E26; S=mean(M[k−8...k]); D=M−S. M starts at k25, S and D at k33; fresh signal crosses are available at k34. The signal is SMA9, not EMA9. In standard MT4 MACD the displayed bars are M; our D is the main-minus-signal series, OsMA.

Read completed buffers at shift=1 and predecessors at shift=2, with chart displacement zero. The reference uses exact rational seeds, recurrences and comparisons; CSV decimals are approximations. A small negative M stays negative even if rounded display text looks like zero. Different history, seeding or signal methods can change values. No equality with a broker terminal’s full-history buffers is claimed.

ComponentDeclared referenceRole / assumption
Price and inputsEURUSD · Bid · M5 · CloseEMA20/50 · MACD12/26/9
EMA20/50 contextEMA20 / EMA50 · CloseE20>E50 · C>E50 / E20<E50 · C<E50
MACD main / SMA signalM=E12−E26 · S=SMA9(M)D=M−S · X→Z · P+1 / P+2
Contract and gridpip=0.0001 · point=tick=0.00001100000 EUR · 10 USD/pip/lot
Account limits0.25% · 1% · 2Per-entry budget · daily equity floor · requests/day

3. BUY: arm below zero and confirm within two bars

From k49 require T_buy=[E20>E50 AND C>E50]. An origin P needs that context and a fresh X_buy=[D_prev≤0 AND D>0], while M(P)<0. Record P but do not order. Persistent D>0 is not another X; a cross rejected for context cannot be adopted after context improves. An already nonnegative M does not meet this below-zero origin rule.

On each later completed bar first cancel if T_buy=0 OR D≤0, next expire if k>P+2, then qualify only on a fresh Z_buy=[M_prev≤0 AND M>0]. Only P+1 and P+2 are eligible; context and D support must hold on every intervening bar. Confirmation consumes P, even if execution later fails. The bar processed as pending cannot also rearm a new episode.

BUY arms on a fresh signal cross below zero. Context and positive D must survive until a fresh zero cross at P+1 or P+2; an arm is not an order.
BUY arms on a fresh signal cross below zero. Context and positive D must survive until a fresh zero cross at P+1 or P+2; an arm is not an order. On small screens, scroll the chart horizontally to keep labels readable.

4. SELL: mirror the events and use the correct quote side

Require T_sell=[E20<E50 AND C<E50], a fresh X_sell=[D_prev≥0 AND D<0] and M(P)>0. At later completed bars first cancel for T_sell=0 OR D≥0, next expire beyond P+2, then require fresh Z_sell=[M_prev≥0 AND M<0]. Equal main at zero is not confirmation. A simultaneous X and Z without an active P does not supply a prior positive-main SELL origin.

After confirmation, cancellation or expiry the old P remains closed. Only a future independent X satisfying every origin condition can start again; no same-bar reuse or retrospective deadline extension. BUY enters Ask and exits Bid; SELL enters Bid and exits Ask. SELL’s numerical Ask stop is derived from completed Bid highs, not an observed Ask high. Bid-only candles cannot reconstruct an Ask exit path or the first of two intrabar barriers.

SELL mirrors the two-stage episode. Its protected entry is Bid and its fixed stop and target trigger on Ask; all indicators still use completed Bid closes.
SELL mirrors the two-stage episode. Its protected entry is Bid and its fixed stop and target trigger on Ask; all indicators still use completed Bid closes. On small screens, scroll the chart horizontally to keep labels readable.

5. Gate the session, account and daily exposure

Accept qualification times only at 07:00≤q UTC<09:30; flatten at 10:00 UTC. These fixed UTC hours are model choices, not a claim about a daylight-saving-adjusted London session. Record the broker-to-UTC mapping. Require bar detection within 1s, candidate quote timestamp at or after q and quote age at most 250ms at send. Millisecond checks require suitable recorded timestamps and a monotonic clock, not invented precision from second-resolution server time.

At most 2 transmitted entry requests/day, including rejections and timeouts. A preflight skip consumes q without using a transmitted attempt. Record verified day-start equity Eday; block new entries and close owned exposure at the first available valid quote when equity reaches 0.99*Eday. Unknown baseline, cash flows or unresolved account state pauses the model. Reset the day only when flat and reconciled. No automatic news filter is included in this specification.

StageDeadline / windowAction
q07:00 ≤ UTC < 09:30Qualification times
q+1s≤1000 msLatest first bar detection
q+2s≤2000 ms · age≤250 msAt most one request
q+4×M5 / 10:00min(q+20min, 10:00 UTC)First available quote to exit

6. Freeze the stop and a gross two-distance target

Let E0=Ask_ref for BUY and E0=Bid_ref for SELL. Set BUY stop S_bid=floor_tick(min BidLow[P..q]−1pip) or SELL stop S_ask=ceil_tick(max BidHigh[P..q]+1pip). Require d=abs(E0−S)/pip; 3≤d≤12. Target is T_bid=floor_tick(E0+2*d*pip) or T_ask=ceil_tick(E0−2*d*pip). Freeze levels from the episode and first quote, never from a later fill or indicator update. Broker constraints cause a skip, never a wider stop.

Worst planned entry is Fmax=Ask_ref+0.2pip or Fmin=Bid_ref−0.2pip. Add round-trip commission 0.6 pip and an exit-only reserve 0.4 pip once to planned loss; subtract them from target reward. Require reward_pips/loss_pips≥1.30. A gross target twice d does not guarantee this net ratio. The entry allowance is already in F, and the planning reserve is not an actual fee or a guaranteed fill bound.

Reference entryFixed stopFixed target
BUYE0=Ask_refS_bid=floor_tick(min BidLow[P..q]−1pip)T_bid=floor_tick(E0+2*(E0−S_bid))
SELLE0=Bid_refS_ask=ceil_tick(max BidHigh[P..q]+1pip)T_ask=ceil_tick(E0−2*(S_ask−E0))

7. Consume the first quote and send at most once

At the first detection of q, capture the first candidate Bid/Ask. Require spread ≤1.0pip and absolute Bid deviation from q’s completed Bid close ≤1.0pip. Complete preflight and transmit no later than q+2s, inclusive. Recheck current quote validity, age, costs, risk, permissions, margin and protection before send; any failure consumes q. A changed quote must remain inside the original entry tolerance and pass these checks; original levels and reference stay frozen.

Use one request with attached stop and target; skip if the execution environment cannot support this protected entry. No entry retry follows rejection, stale data, a bad spread, missed deadline or timeout. In bad_quote the first spread is 1.5 pip and later narrows to 0.8; no request follows. In late_request preflight finishes at q+2.5s: the deadline fails before any send. A later favourable quote does not revive either qualification.

8. Follow the timely BUY from origin to an executable quote

The constructed origin P=k75 / 08:00 UTC closes 1.10000. In pip-scaled units M≈−0.3316; S≈−0.3520; D≈+0.0204, after negative D on k74. Context passes, so the below-zero signal cross arms P. At k76 M remains negative. At q=k77 / 08:10 UTC, close 1.10020 has M≈+0.1778; S≈−0.4285; D≈+0.6063. Continuous context and D support plus the new zero cross qualify at P+2.

First Bid/Ask at +250 ms is 1.10021 / 1.10029. Stop 1.09977, fixed target 1.10133 and worst entry 1.10031 give d=5.2; loss=6.4; net target=9.2; ratio=1.4375. Equity 10000 USD gives a 25 USD budget and 0.39 lots / 24.96 USD planned risk. Request at +400 ms, verified fill 1.10030 at +550 ms, target Bid at 08:15:20: gross 10.3 less commission 0.6 equals 9.7 pips / 37.83 USD. A scheduled bar close was not itself an executable fill.

buy_target: Bid candles and EMA20/50 accompany the MACD main and SMA9 signal. P=k75 arms below zero; q=k77 confirms. The target is reached on a later quote.
buy_target: Bid candles and EMA20/50 accompany the MACD main and SMA9 signal. P=k75 arms below zero; q=k77 confirms. The target is reached on a later quote. On small screens, scroll the chart horizontally to keep labels readable.
SideBid / AskS / TLoss (pip)Net target (pip)RatioLotsRisk USD
BUY1.10021 / 1.100291.09977 / 1.101336.49.21.43750.3924.96
SELL1.09971 / 1.099791.10023 / 1.098676.49.21.43750.3924.96

9. Follow the mirrored SELL through its Ask exit

The independent SELL Bid prefix reflects BUY about 2.20000. Its origin main is positive, D crosses below zero, and the main crosses below zero only at q. First Bid/Ask is 1.09971 / 1.09979, stop S_ask=1.10023 and target T_ask=1.09867. Worst entry is 1.09969. All indicators remain Bid-based even when the execution chart displays Ask candles.

The same 6.4-pip planned loss, 9.2-pip net target and 1.4375 ratio permit 0.39 lots and 24.96 USD planned risk. Actual fictional fill 1.09970 exits when Ask reaches 1.09867 at 08:15:20, net 9.7 pips and 37.83 USD. Post-q reflected quotes swap Bid and Ask to preserve execution sides. This engineered symmetry checks arithmetic, not equal BUY/SELL market performance.

sell_target: Ask candles display executable exits, while the main and SMA9 signal come from Bid. The mirrored timely zero cross precedes a fixed Ask target.
sell_target: Ask candles display executable exits, while the main and SMA9 signal come from Bid. The mirrored timely zero cross precedes a fixed Ask target. On small screens, scroll the chart horizontally to keep labels readable.

10. Keep late, cancelled and unarmed zero crosses separate

In late_zero, k77 main is about −0.0035 pips: D and context pass, but there is no strict zero cross. At k78=P+3 / 08:15 UTC M turns positive; expiry wins and Q=0. In signal_lost, k76 D≈−0.0073 pips cancels P. The later k77 double cross has an already positive main, cannot revive P and fails the negative-main origin rule. A cleaner later chart does not recover an earlier entry time.

In context_late, k72 has X but E20≈1.09791351<E50≈1.09792680, so no P opens. Context becomes valid at k74, yet X is no longer fresh; the k75 zero cross remains unarmed. The flat case has M=D=0 and no strict context or event. Retain these distinct reasons and their priority, rather than presenting every positive main value as a valid trade.

late_zero: main remains slightly negative at k77. Its zero cross at k78 is P+3, so expiry takes priority and no entry occurs.
late_zero: main remains slightly negative at k77. Its zero cross at k78 is P+3, so expiry takes priority and no entry occurs. On small screens, scroll the chart horizontally to keep labels readable.

11. Use fixed barriers and a scheduled four-slot exit

After a verified fill, later EMA, M, S or D changes neither move protection nor close the trade. BUY triggers on Bid≤S_bid OR Bid≥T_bid; SELL on Ask≥S_ask OR Ask≤T_ask. Follow chronological executable quotes and actual fills. If a candle includes both barriers without their tick order, the first exit is unknown; do not select a favourable outcome.

Time exit is the first valid quote after min(q+4×M5, 10:00 UTC), four slots meaning 20 scheduled minutes from q. time_exit uses 08:30:00.200, Bid 1.10023, net −1.3 pips / −5.07 USD. buy_gap exits at 1.09962, 1.5 pips worse than its fixed stop, net −7.4 pips / −28.86 USD. This exceeds the 25 USD budget. Stops, reserves and time rules cannot cap losses or guarantee availability through gaps and outages.

buy_gap: a later Bid quote jumps beyond the fixed stop. Actual exit and commission create a 28.86 USD loss, exceeding the 25 USD planning budget.
buy_gap: a later Bid quote jumps beyond the fixed stop. Actual exit and commission create a 28.86 USD loss, exceeding the 25 USD planning budget. On small screens, scroll the chart horizontally to keep labels readable.

12. Reconcile unknown outcomes and failed protection

A request acknowledgement must match the owned symbol, side, volume, stop and target. Log a unique attempt identifier and reconcile the actual order book and fill history. A timeout means unresolved≠rejected≠flat; pause new entries, do not resend, and do not infer a fill or PnL. unknown_request deliberately leaves those fields blank because the account outcome is unavailable.

If reconciliation finds a fill outside the planned adverse bound or missing/wrong protection, attempt an emergency close of the verified owned ticket and halt new entries. Verify the close result and continue risk reconciliation if uncertain; never widen the fixed stop to repair the trade. Emergency risk actions are separate from the entry-attempt cap. No instruction here authorizes interference with unrelated account positions.

13. Size cash risk and distinguish reserves from fees

Use B=min(0.0025*equity, equity−0.99*Eday), requiring positive headroom. With assumed 10 USD/pip/standard lot and 0.01 lot step, lots=floor_step(B/(planned loss pips*10)). Skip below minimum lot or on failed maximum-volume, margin or contract checks. Recompute quote-to-account conversion when needed; EURUSD and a USD account make the fictional pip value direct.

For BUY planned loss is (Fmax−S_bid)/pip+1.0 and net reward (T_bid−Fmax)/pip−1.0; SELL mirrors the distances from Fmin. Spread is already represented by executable sides and must not be added again. Actual net PnL uses actual entry/exit and actual fees; the 0.4-pip exit reserve is not a fee. The target fixture’s actual 37.83 USD and the planning reward answer different questions.

Worst entry and cost assumptions determine risk and size. Gross target geometry leaves 9.2 net pips against 6.4 planned loss; the reserve is not an actual fee.
Worst entry and cost assumptions determine risk and size. Gross target geometry leaves 9.2 net pips against 6.4 planned loss; the reserve is not an actual fee. On small screens, scroll the chart horizontally to keep labels readable.

14. Reconstruct all bars, quotes and nullable results

Three public CSVs contain twelve independent cases of 100 bars each, totaling 12×100=1200 bar rows, chronological execution events and the case ledger. Scheduled UTC closes begin at 2026-02-03 01:45 UTC. Through q, four BUY branch prefixes translate the guide’s EURGBP closes by +0.24765 into explicitly fictional EURUSD inputs. This preserves difference-series timing without claiming that another instrument follows the same market path. SELL reflects the accepted prefix; flat is constant.

Before q, Ask OHLC is explicitly Bid+0.8 pip. After q, separate Bid/Ask OHLC aggregates the listed quote tape. The time-exit quote at q+20min+200 ms belongs to open k82, not closed k81. The ledger keeps first references, diagnostic plans, actual fills and fees separate; absent or unresolved PnL remains blank. Later market quotes do not imply another trade. Recalculate weighted EMA expansions, SMA signal, event calendars, protection, size and actual quote-side exits.

Download fictional M5 bars and indicators (CSV)

Download chronological execution events (CSV)

Download independent case ledger (CSV)

15. Test gross geometry, execution and uncertain outcomes

cost_reject has the same timely qualification but first Bid/Ask 1.10010 / 1.10012, exactly 1 pip Bid deviation and only 0.2 pip spread. Stop 1.09977 gives d=3.5; T=1.10082. Worst entry 1.10014 yields loss=4.7; net target=5.8; ratio≈1.2340<1.30. No request follows; diagnostic 0.53 lots / 24.91 USD cannot repair the failed ratio. Even a tighter spread and gross 2:1 geometry need the explicit net gate.

Across independent cases there are Q=8; request_count=5; closed=4; unresolved=1. They are not one day’s portfolio or a win-rate sample. Before any performance study, freeze all variants and use suitable untouched Bid/Ask data, variable costs, gaps, rejected or unknown orders, protection failures, outages and verified clock conversion. Compare net expectancy, drawdown, turnover, uncertainty and cost sensitivity; fewer signals alone do not prove improvement.

A timely signal can fail its net ratio or send deadline. An unknown request requires reconciliation. Independent case counts do not measure market performance.
A timely signal can fail its net ratio or send deadline. An unknown request requires reconciliation. Independent case counts do not measure market performance. On small screens, scroll the chart horizontally to keep labels readable.
Independent caseRequestsOutcome
buy_target1Fixed target; known fill
sell_target1Ask target; known fill
buy_gap1Gap stop; −28.86 USD
time_exit1Time exit; −5.07 USD
bad_quote0First spread rejected
late_request0Send deadline missed
unknown_request1Unknown; reconcile
cost_reject0Net ratio rejected
late_zero0Zero cross after expiry
signal_lost0Main-versus-signal support lost
context_late0Context rejected at origin
flat0No strict context or event

16. Implement the exact episode and complete the cluster

Keep the sequence explicit: complete history, EMA context, fresh opposite-side signal cross, pending P, continuous support, timely fresh zero cross, consumed first-quote decision, one request, verified fixed protection, chronological exit and reconciled flat state. Cancellation precedes expiry and expiry precedes confirmation. A later restored context, positive main or favourable quote cannot lend an old origin its missing event or price.

This is the third complete strategy in the scalping indicator-combination group, following EMA–RSI and Bollinger–Stochastic. The three guides explain their signal foundations; each strategy supplies its own full entry and exit specification. Compare them as separately frozen candidates using common execution evidence, not as votes or automatic portfolio diversification. Publish and audit this completed cluster before choosing another topic; fictional case outcomes justify no profitable-trading claim.

Frequently asked questions

Does MACD above zero independently confirm EMA12 above EMA26?

No. With matching prices, seeds and alignment, M=EMA12−EMA26 makes those conditions identical. EMA20/50 is a different context pair, but still uses overlapping inputs and supplies no guarantee of independent evidence.

Can a zero cross at P+3 confirm the original signal?

No. Only P+1 and P+2 may qualify, with context and D support continuously valid. Expiry takes priority at P+3. A future independent origin must satisfy every condition again.

Are standard MT4 MACD bars the main-minus-signal difference?

The standard MT4 display plots the main line as bars. This strategy names the main M, the SMA9 signal S and their difference D, equivalent to OsMA. An EMA9 signal changes the model and its event calendar.

Does a gross two-to-one target guarantee a passing net ratio?

No. Entry tolerance, commission and exit reserve reduce net target room and increase planned loss. The cost_reject case has gross 2:1 geometry but a net ratio about 1.2340, below the required 1.30, so no request is sent.

Can a timeout or a later better quote permit another request?

No. The first candidate quote consumes q, and an unresolved transmitted request is neither a rejection nor proof of a flat account. Pause, reconcile owned orders and fills, and do not resend or invent a result.

Do these examples demonstrate profitable scalping?

No. The twelve constructed independent cases test mechanics, not frequencies, expectancy or live readiness. The gap example also exceeds the planned budget. Economic value requires suitable unseen execution data and uncertainty analysis.

Sources and research notes

MetaQuotes documents iMA and iMACD inputs, the SMA signal in standard MT4 MACD, OsMA as main minus signal, and order parameters. Our finite SMA seeds, two-bar episode, target geometry, timing and risk settings are declared research choices. The guide’s EURGBP prefixes are translated by a fixed amount into explicitly constructed EURUSD cases; this is neither terminal parity nor measured market performance.

Educational research specification. Prices, quotes and outcomes here are fictional. Forex trading involves risk. Stops, slippage settings and planning reserves cannot guarantee execution prices, profitable returns or a maximum actual loss.