ForexBestRobots.comCompare EAs →
EN

Scalping indicator combination strategies · Strategy 2

Bollinger Bands and Stochastic M5 Forex Scalping Strategy: First Return and Frozen Target

A complete EURUSD M5 Bollinger–Stochastic research strategy: first-return entry, frozen middle target, protected orders, net-cost gates and reproducible cases.

Bollinger20/2 and Stochastic14/3/3: a first return, one protected entry and a frozen middle target. Every price and execution case is fictional.
Bollinger20/2 and Stochastic14/3/3: a first return, one protected entry and a frozen middle target. Every price and execution case is fictional.

A return inside a moving band is not enough. This strategy requires the first return past a previously frozen edge, a fresh Stochastic cross on that same bar and enough executable room to the frozen middle after costs. Each qualification permits one entry decision.

1. Freeze the complete first-return model

Use EURUSD · M5 · Bid OHLC · Close and a USD account. Bollinger Bands define relative location and dispersion; Stochastic supplies a timed crossing. Both reuse overlapping prices and can remain extreme during a trend. This is a reproducible research candidate, with no claimed win rate, optimum settings or expected profit. A band touch alone is not an entry.

Allow one owned position or unresolved entry request per symbol. No averaging, pyramiding, hedge, partial exit, trailing or break-even adjustment. Ignore new origins while pending or invested; after a verified exit, wait for a later independent outside event. Missing required bars terminate an observation: rebuild contiguous history before another origin. The fixed UTC and execution policies match the preceding EMA–RSI strategy to make their specifications easier to compare.

2. Define bands and the exact Stochastic calculation

From k19 use M=mean(C[k−19...k]); V=mean((C−M)^2), with population denominator 20. Set L=M−2sqrt(V); U=M+2sqrt(V). Stochastic14/3/3 uses completed Bid highs and lows: A=C−LL14; B=HH14−LL14, K=100*sum(A[k−2...k])/sum(B[k−2...k]) and D=mean(K[k−2...k]). This ratio of sums is not an average of three raw percentages when denominators differ. A zero summed denominator gives our convention K=50.

K begins at k15, D at k17 and fresh crossings at k18. Read completed buffers with shift=1 and predecessors at shift=2; chart displacement is zero. The reference keeps exact rational moments and K/D, and compares band thresholds through equivalent squared inequalities; square roots are only for display. Another history or platform implementation can change values, so terminal parity is not established. Two standard deviations do not guarantee a future containment probability.

ComponentDeclared referenceRole / assumption
Price and inputsEURUSD · Bid · M5 · CloseBB20/2 · Stochastic14/3/3
Bollinger BandsSMA20 · V=Σ(C−M)²/20 · 2σ8...30pip · |ΔM_3|≤2pip
Stochastic14/3/3 · Low/High · SMAK=100ΣA/ΣB · D=SMA3(K)
Contract and gridpip=0.0001 · tick=0.00001100000 EUR · 10 USD/pip/lot
Account limits0.25% · 1% · 2Per-entry budget · daily equity floor · requests/day

3. BUY: freeze the prior context and consume the first return

Require the previous bar’s G=[8≤(U−L)/pip≤30 AND abs(M(k)−M(k−3))/pip≤2], assessable from k22. A fresh outside origin P needs C(P−1)≥L(P−1) AND C(P)<L(P−1) AND K(P)≤20. Freeze L_ref, M_ref, U_ref from P−1 and Z_buy=L_ref−(U_ref−L_ref)/2. Reject a close at or below Z. G is frozen at P−1, not retested using a more convenient later band.

On each later completed bar first cancel if C≤Z_buy, next expire if k>P+2, then inspect the first strict return. It needs L_ref<C<M_ref and a fresh K_prev≤D_prev AND K>D on that same bar. Only P+1 and P+2 are eligible. A first return lacking the cross, or already at the middle, consumes P as rejected. Additional outside closes never replace P or extend its deadline.

BUY freezes the previous context and band edge. Only the first return within two bars can qualify, with its own fresh K/D cross.
BUY freezes the previous context and band edge. Only the first return within two bars can qualify, with its own fresh K/D cross. On small screens, scroll the chart horizontally to keep labels readable.

4. SELL: mirror the signal and specify executable exits

A fresh SELL origin needs previous G and C(P−1)≤U(P−1) AND C(P)>U(P−1) AND K(P)≥80. Freeze the same prior-bar reference and Z_sell=U_ref+(U_ref−L_ref)/2. Reject or cancel at C≥Z_sell, expire after P+2, then require the first M_ref<C<U_ref with fresh K_prev≥D_prev AND K<D. No later cross can repair an earlier rejected return; no same-bar rearming is allowed.

After cancellation or expiry while still outside, keep the episode locked until a completed close recovers its frozen edge. That recovery only releases the lock for a future independent origin. BUY enters Ask and exits Bid; SELL enters Bid and exits Ask. SELL’s numerical Ask stop comes from completed Bid highs, not an observed Ask swing high. Bid OHLC alone cannot establish an Ask path or intrabar exit order.

SELL mirrors the outside event and first return. Its entry is Bid and fixed stop and target are Ask-side thresholds, while indicators use Bid OHLC.
SELL mirrors the outside event and first return. Its entry is Bid and fixed stop and target are Ask-side thresholds, while indicators use Bid OHLC. 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≤1000msLatest first bar detection
q+2s≤2000ms · age≤250msAt most one request
q+4×M5 / 10:00min(q+20min, 10:00 UTC)First available quote to exit

6. Freeze the middle target and an executable-side stop

Use d=abs(E0−S)/pip with 3≤d≤12. BUY stop is the lowest completed Bid low from P through q minus one pip, rounded down; SELL stop is the highest Bid high plus one pip, rounded up, as an Ask-side threshold. BUY target is T_bid=floor_tick(M_ref); SELL target is T_ask=ceil_tick(M_ref). Rounding brings the target inward when the frozen mean lies between ticks. Freeze all levels from the episode and first quote; never move them with subsequent bands or the actual fill.

Plan adverse entry tolerance 0.2pip=2points. BUY worst entry is Fmax=Ask_ref+0.2pip; SELL is Fmin=Bid_ref−0.2pip. Add round-trip commission 0.6 pip and exit-execution reserve 0.4 pip once to planned loss, subtract them from target reward, and require net reward/planned loss≥1.30. Entry tolerance is already in F; the reserve covers exit only. Fixed levels violating broker constraints cause a skip, never a wider stop.

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

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 accepted BUY from origin to target

The constructed buy_target history has prior width about 18.6376 pips, L_ref≈1.09909812; M_ref=1.10003. At P=k44 / 08:00 UTC, close is 1.09900 and K≈6.1069. The next close 1.09901 remains outside. The first return at q=k46 / 08:10 UTC closes 1.09915; K≈4.9645 exceeds D≈4.4870 after the previous nonpositive difference. K need not cross above 20: this model requires the fresh K/D event.

First Bid/Ask at q+250ms is 1.09916 / 1.09924, with S_bid=1.09886; T_bid=1.10003. Worst entry 1.09926 gives loss 5.0 pips, net target 6.7 and ratio 1.34. Independent equity 10000 USD gives a 25 USD budget: 0.50 lots / 25.00 USD planned risk. Request at +400ms, verified fill 1.09925 at +550ms, target Bid at 08:15:20: gross 7.8 less actual commission 0.6 equals 7.2 pips / 36.00 USD. The reserve is not charged as a fee.

buy_target: completed Bid candles and rolling bands accompany the frozen reference. q=k46 qualifies; the frozen middle target is reached on a later explicit quote.
buy_target: completed Bid candles and rolling bands accompany the frozen reference. q=k46 qualifies; the frozen middle target is reached on a later explicit quote. On small screens, scroll the chart horizontally to keep labels readable.
SideBid / AskS / TLoss (pip)Net target (pip)RatioLotsRisk USD
BUY1.09916 / 1.099241.09886 / 1.100035.06.71.340.5025.00
SELL1.10076 / 1.100841.10114 / 1.099975.06.71.340.5025.00

9. Follow the SELL with an Ask-side frozen target

The independent sell_target Bid prefix reflects the BUY prefix around 2.20000. Its origin K≈93.8931 is above 80; the return has K≈95.0355 below D≈95.5130 after previously K≥D. These values can remain above 80 while satisfying the downward cross. First Bid/Ask is 1.10076 / 1.10084, with S_ask=1.10114; T_ask=1.09997. The target is the frozen middle rounded up, not a later recalculated mean.

Worst Bid entry 1.10074 produces the same 5.0-pip planned loss, 6.7-pip net target, 1.34 ratio and 0.50-lot size. Verified fill is 1.10075; Ask reaches 1.09997 at 08:15:20, net 7.2 pips and 36.00 USD. The execution chart uses Ask candles while Stochastic still uses Bid OHLC. This engineered symmetry verifies quote-side arithmetic; it is not evidence of equal BUY and SELL performance.

sell_target: Ask candles show the executable exit side. Stochastic still comes from Bid OHLC. The frozen Ask middle target is reached after the entry.
sell_target: Ask candles show the executable exit side. Stochastic still comes from Bid OHLC. The frozen Ask middle target is reached after the entry. On small screens, scroll the chart horizontally to keep labels readable.

10. Keep rejected returns and cost failures separate

In early_return the first return at k45 / 08:05 UTC has K≈12.3457 below D≈16.8343 and is rejected. The fresh cross at k46 has no active P. In moving_only, the current lower band falls below price while price still falls; the frozen edge is not recovered. The actual return and cross at k47=P+3 arrive after expiry. breakout_cancel instead closes below its depth boundary at k45; recovery at k46 merely releases the lock. All retain Q=0.

cost_reject preserves the guide’s original timely signal through q, so Q=1. First Bid/Ask 1.09970 / 1.09978, stop 1.09916 and frozen middle target 1.10002 give planned loss 7.4 pips but net target only 1.2 pips: ratio 0.1622 fails 1.30. No request follows. The accepted example uses a separately constructed wider context and shallower excursion; it does not rewrite the original signal or demonstrate optimized market settings.

early_return: k45 recovers the frozen edge without the required cross and ends the episode. The fresh cross at k46 cannot reuse that earlier return.
early_return: k45 recovers the frozen edge without the required cross and ends the episode. The fresh cross at k46 cannot reuse that earlier return. On small screens, scroll the chart horizontally to keep labels readable.

11. Use fixed exits, a four-bar limit and actual fills

After a verified fill, new bands and oscillator reversals neither move protection nor close the trade. BUY barriers trigger on Bid≤S_bid OR Bid≥T_bid; SELL on Ask≥S_ask OR Ask≤T_ask. Follow chronological quotes and actual fills. A candle containing both barriers without tick order cannot identify the first exit; do not select the favourable result.

Time exit is the first valid quote after min(q+4 completed M5 slots, 10:00 UTC), unless already closed. The four slots correspond to 20 scheduled minutes. time_exit uses 08:30:00.200, Bid 1.09918, net −1.3 pips / −6.50 USD. buy_gap exits at 1.09871, 1.5 pips worse than its fixed stop: net −6.0 pips / −30.00 USD, exceeding the budget. Stops and reserves do not cap actual losses; outages can delay flattening.

buy_gap: Bid jumps through the fixed stop. Actual exit and commission create a loss beyond the 25 USD planning budget.
buy_gap: Bid jumps through the fixed stop. Actual exit and commission create a loss beyond 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 36.00 USD and the planning reward answer different questions.

Worst entry, actual fee assumptions and exit reserve determine size. The frozen target leaves 6.7 net pips against 5.0 planned loss; the reserve is not an actual fee.
Worst entry, actual fee assumptions and exit reserve determine size. The frozen target leaves 6.7 net pips against 5.0 planned loss; the reserve is not an actual fee. On small screens, scroll the chart horizontally to keep labels readable.

14. Rebuild all bars, events and nullable outcomes

The public bar file has 12 independent cases ×64 bars=768 rows, with scheduled UTC closes beginning at 2026-02-03 04:20 UTC. Four diagnostic branches retain the earlier guide’s history through q. The accepted BUY uses a distinct constructed prefix; SELL reflects it. All indicators use each case’s Bid OHLC. Pre-q Ask is explicitly constructed as Bid+0.8 pip; post-q OHLC aggregates listed quotes, not a recovered live feed.

The event file supplies chronological quotes, requests, known acknowledgements, exits and the unresolved timeout. The ledger separates frozen references, worst planned entry, actual fills, fees and unknown results. The time-exit quote at q+20min+200ms belongs to the next open bar k51, not to the completed k50 candle. Later market quotes do not imply another trade. Recalculate moments, Stochastic, first returns, protection, size and PnL independently.

Download fictional M5 bars and indicators (CSV)

Download chronological execution events (CSV)

Download independent case ledger (CSV)

15. Verify branch coverage before studying performance

The casebook contains 8 qualifications; 5 transmitted requests; 4 known closed fills; 1 unresolved request. Other cases exercise first-spread rejection, missed deadline, an otherwise valid signal failing the net ratio, first-return rejection, late recovery, depth cancellation and equality. Each case starts independently; they are not one day’s portfolio and do not bypass the two-request daily limit. No-order and unknown PnL remain blank, not zero-filled trades.

Freeze the specification and all parameter variants before testing suitable unseen Bid/Ask ticks, variable costs, gaps, rejected or unknown orders, outages and clock conversion. Compare net expectancy, drawdown, turnover, uncertainty and cost sensitivity. Test equity-floor breaches and protection failures in a controlled environment as well. These constructed successes and failures establish neither a market win rate nor live readiness or economic advantage.

A valid signal can fail the net ratio, first spread or request deadline. Unknown requests pause the model. Independent case counts do not estimate market performance.
A valid signal can fail the net ratio, first spread or request deadline. Unknown requests pause the model. Independent case counts do not estimate market performance. On small screens, scroll the chart horizontally to keep labels readable.
Independent caseRequestsOutcome
buy_target1Frozen middle; known fill
sell_target1Ask middle; known fill
buy_gap1Gap stop; −30.00 USD
time_exit1Time exit; −6.50 USD
bad_quote0First spread rejected
late_request0Send deadline missed
unknown_request1Unknown; reconcile
cost_reject0Net ratio rejected
early_return0First return lacks cross
moving_only0Return after expiry
breakout_cancel0Depth cancellation
flat0No strict context or signal

16. Implement the same episode and order state machine

Keep the sequence explicit: complete inputs, prior context, fresh outside origin, frozen references, first return within two bars, same-bar fresh cross, consumed first-quote decision, one request, verified protection, fixed exit and reconciled flat state. A moving-band return cannot substitute for frozen-price recovery. Log every failed gate and its priority, including a valid signal rejected for inadequate net target room.

This is the second complete strategy in the scalping indicator-combination group. The Bollinger–Stochastic guide explains the signal foundation, while EMA–RSI uses a different reset sequence and target geometry. The related testing and sizing guides supply data and account checks. The next combination, EMA with MACD, needs its own rules and evidence. Audit this publication before extending the group; fictional outcomes cannot justify profitable-trading claims.

Frequently asked questions

Can a later Stochastic cross repair the first rejected return?

No. The first return consumes P. A cross must occur on that same eligible bar; after rejection, cancellation or expiry a later independent outside origin is required.

Must K leave the 20/80 zone to qualify?

No. K at the origin must be at or below20 for BUY or at or above80 for SELL. The return requires a fresh K/D cross, not an additional zone exit.

Does the target follow the current Bollinger middle?

No. Freeze the middle from P−1 and round inward to the tick grid. Subsequent indicator values and the actual fill never recenter it.

Why can a valid first-return signal produce no order?

The first quote must also pass spread, timing, distance, net-reward, account and protection checks. cost_reject has Q=1 but insufficient reward after costs, so no request is sent.

Does a timeout permit another entry request?

No. Pause and reconcile the actual owned order and fills. An unknown result is neither rejection nor evidence of being flat; its PnL remains unknown.

Do the examples establish profitability?

No. They are independent synthetic verification cases. Suitable unseen tick data, realistic execution and further controlled validation are needed to assess performance.

Sources and research notes

MetaQuotes documents indicator inputs and executable order sides; its Stochastic reference explains the oscillator. John Bollinger describes the limits of band tags and trend walks. Our finite formulas, episode, target, timing and risk settings are declared research choices, not optimized recommendations or broker guarantees.

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.