Independent market intelligence
Research over noise · Risk before return
Forex strategy research · GBP/USD

GBP/USD H4 Envelopes strategy: SMA20 + ADX14 after costs

The Envelopes SMA20 + ADX14 account returns +1.28% cumulatively over 2020–2025 after baseline costs, with 10.34% H4-close drawdown across 171 trades. The restarted later account returns −3.04%; the higher-cost full-period scenario returns −1.37%. Without the ADX entry gate, the full-period return is −11.72%. The small full-period gain is sensitive to costs and period.

In simple terms

Under the strategy’s rules, we buy GBP/USD after an H4 candle closes above the upper Envelopes band, while the previous candle closed at or below its own upper band. We sell short after the mirrored move below the lower band. In both cases, Wilder ADX14 must be at least 25 on the just-closed candle. We enter at the next scheduled opening. A fixed ATR14 stop, a return to the central SMA20 or a time limit closes the position.

On this page
01

Turn the indicator guide into one fixed strategy question

Our Envelopes guide explains percentage bands and Wilder ADX without trading returns. This separate strategy asks whether an ADX14≥25 entry gate improves a completed-close breakout of SMA20 bands set 0.5% on each side. One control removes only that threshold. We fix the center-line exit, stop, sizing, source, costs and account periods before calculation. The retained history was familiar; restarted early and later accounts are retrospective comparisons, not unseen prospective tests. No lengths, widths, thresholds or exits were chosen after observing results.

02

Preserve observed Bid prices and disclose incomplete coverage

We verify 7 retained annual HistData GBPUSD M1 ZIP archives for 2019–2025, pinned hashes and CRC. After collapsing only 420 byte-identical duplicate rows, 2,553,590 actual minutes form 11,261 observed UTC H4 buckets. Original timestamps use fixed EST, UTC−05 without daylight-saving adjustments; we add five hours. We retain 3,086 buckets with fewer than 240 minutes and 624 without the final minute. Their retained final quotes are disclosed close proxies. Ask and real executions are not observed. This verifies retained bytes, not a new source download or provider-published checksum.

03

Set a percentage envelope with no horizontal shift

The center is the mean of the latest twenty observed Bid closes. The upper line equals SMA20×1.005 and the lower SMA20×0.995. Thus 0.5% is the half-width; the complete channel spans 1% of the center. In a percentage parameter field, enter 0.5 to represent the fraction 0.005. These are neither 0.5 price units nor volatility-scaled ATR or standard-deviation bands. We use close-based SMA20 with shift zero and exact rational price comparisons. The first bands need twenty observations; a fresh crossing first needs twenty-one.

k = 0.5/100 = 0.005; SMA20_t = Σ(C,20)/20
Upper_t = SMA20_t×1.005; Lower_t = SMA20_t×0.995

Constructed example: a 0.5% half-width

Constructed example: a 0.5% half-widthUpper · SMA20 +0.5%1.25625SMA20 · USD per GBP1.25000Lower · SMA20 −0.5%1.24375
Constructed arithmetic: SMA20 at 1.25000 USD per GBP gives an upper band of 1.25625 and a lower band of 1.24375. Each side is 62.5 pips from the center; total width is 125 pips. This is not an additional trade or market snapshot.
04

Keep Wilder strength separate from direction and stop ATR

ADX is built from fourteen-transition Wilder smoothing of true range and directional movement, followed by smoothing DX over fourteen observations. A positive directional move counts only when it exceeds the opposing positive move; tied moves set both DM values to zero. The first bar supplies a predecessor, so DI/DX first appear on observation fifteen and ADX on twenty-eight. Zero smoothed range or zero summed DI gives zero in the corresponding ratio. Stop ATR14 has a separate first H−L range and starts on observation fourteen. ADX measures strength; we add no +DI/−DI direction gate and no requirement that ADX be rising.

TR_t = max(H_t−L_t, |H_t−C_prev|, |L_t−C_prev|)
Up = H_t−H_prev; Down = L_prev−L_t
DM_plus = max(Up,0)×1[Up>Down]; DM_minus = max(Down,0)×1[Down>Up]
RMA14_t = (13×RMA14_prev+x_t)/14
DI_plus = 100×RMA14(DM_plus)/RMA14(TR); DI_minus = 100×RMA14(DM_minus)/RMA14(TR)
DX = 100×|DI_plus−DI_minus|/(DI_plus+DI_minus); ADX14 = RMA14(DX)

05

Confirm a closing-price breakout and the same eligibility

For a long entry, previous Bid close must be at or below its previous upper band and the closing price of the just-closed H4 candle must be strictly above its current upper band. For a short, previous close must be at or above its previous lower band and current close strictly below its current lower band. Previous equality is allowed; current equality is not a breakout. A high or low touching the final band is insufficient. Both variants need twenty-eight observed bars, defined ADX and positive stop ATR14; entry anchors must be exactly four hours apart. The primary additionally requires ADX14≥25, including equality. The control removes only that threshold.

Long: C_prev ≤ Upper_prev; C_t > Upper_t; ADX14_t ≥ 25
Short: C_prev ≥ Lower_prev; C_t < Lower_t; ADX14_t ≥ 25

06

Use the exact next opening and fix one stop

A completed signal queues entry at the immediately next scheduled H4 opening. An actual M1 opening must exist at that timestamp inside the account period and modeled trading week; a later quote does not rescue a missing entry. Long fill is Bid open plus spread and adverse slippage; short fill is Bid open minus slippage. Fix the stop at a distance of twice the signal ATR14 from that modeled fill. Long stops trigger on observed Bid, short stops on modeled Ask=Bid+spread. We hold one position without pyramiding, targets, trailing stops or immediate reversal. Commissions are booked separately from fill prices.

D = 2×ATR14_signal
Long: SL = E−D
Short: SL = E+D

07

Schedule the center-line exit independently of ADX

For a held long, we schedule an exit when a just-closed H4 candle has Bid close≤SMA20; for a short, when close≥SMA20. Equality qualifies, without a new cross, ADX threshold, DI direction, adjacency, entry warmup or positive ATR. Returning merely inside the outer band is insufficient. Pending exits survive absent quotes. At each observed M1 opening, a stop gap takes priority over a queued center exit and an overdue deadline; only then is the minute range checked for a stop. The earliest deadline is thirty calendar H4 slots, Friday 17:00 New York or account end. Use an observed preceding-minute close at an exact deadline; otherwise the first later opening, with last in-period close at account end. An intraminute stop identifies an interval, not an exact tick.

Long: C_t ≤ SMA20_t
Short: C_t ≥ SMA20_t

08

Compare two permissible quantities, then measure net R

Each account begins with 10,000 USD. Position quantity is the smaller of the GBP quantity allowed by a nominal 1% stop-loss budget and the quantity covered by pre-entry USD cash including entry commission. This collateral and mark-to-market model is not actual GBP delivery or a broker margin schedule. Cash limits bind in 161 primary trades. The nominal loss budget includes exit slippage and both commissions, but excludes unknown future holding debits and opening gaps. Net R divides realized net USD profit/loss by planned entry cash risk. Because that risk varies under the cash cap, an unweighted mean R need not have the same sign as cumulative account return; 1% is not a guaranteed maximum loss.

L_unit = D+slip+2×commission_per_GBP
q = min[0.01×B/L_unit, B/(|E|+commission_per_GBP)]
R_net = P_net/(q×L_unit)

Formula symbols: C/H/L are observed Bid prices; Upper/Lower and SMA20 are the current percentage-envelope lines. TR/DM/DI/DX follow the stated Wilder convention; 1[condition] is one when true and zero otherwise. ATR14 is the separate stop estimator. E/X: modeled fills; B: pre-entry USD cash; d: +1 long or −1 short; q: GBP quantity; D: twice signal ATR14; SL: Bid stop for longs or modeled Ask stop for shorts; carry: USD debit per GBP per financing unit; F: accrued units; X_liq: estimated liquidation fill; P_net: net USD P&L; L_unit: planned USD loss per GBP. S on charts marks the completed signal candle.

09

Rebuild the three cost scenarios

Baseline assumptions are 1.00 pip spread, 0.10 pip adverse slippage per leg, 3.50 USD commission per 100,000 GBP per leg and 0.20 pip per financing unit. Higher costs double these assumptions; zero costs remove them. Financing is a research debit for either direction at 17:00 New York time, Monday–Friday, with three units on Wednesday; it is not reconstructed broker swap history. Returns are +4.21% without costs, +1.28% at baseline and −1.37% at higher costs. Each run rebuilds fills, stops, quantities and later cash. Diagnostic cost columns must not be subtracted again from net return.

Ask = Bid+spread_pips×0.0001
P_net = d×q×(X−E)−2q×commission_per_GBP−q×carry×F

The predefined cost scenarios

The predefined cost scenarios0.00%Envelopes + ADX · zerocosts+4.21%Envelopes + ADX14≥25+1.28%Envelopes + ADX ·higher costs−1.37%
Costs and full-account results
Account or scenarioNet return %Commissions · USDHolding debits · USDModeled spread · USDAdverse slippage · USD
Envelopes + ADX · zero costs+4.210.000.000.000.00
Envelopes + ADX14≥25+1.2894.8454.69135.4927.10
Envelopes + ADX · higher costs−1.37187.15107.89267.3653.47
Complete reruns change fills, fixed stops, quantities and cash. Commission, holding, spread and slippage columns are ledger diagnostics, not fees to subtract again from net return.
10

Read the narrow gain beside the later loss

The primary full-period account returns +1.28% from 171 trades: 60 winners, 110 losers and 1 flat trade. Profit factor is 1.03, sampled H4-close drawdown 10.34% and observed-bucket occupancy 15.78%. The separately restarted early account returns +4.46%, while the later account returns −3.04%. These are cumulative period results, not annual rates. The full-period gain has a small margin over losses and becomes negative under higher costs. USD cash with zero assumed interest is a simple reference, not a risk-matched benchmark. H4 marks do not capture every intraminute extreme.

The continuous accounts after costs

The continuous accounts after costs8,3479,20810,06910,93011,791Envelopes + ADX14≥25Envelopes without ADX gate202020232026
Both accounts start with 10,000 USD. H4-close marks estimate liquidation costs and accrued holding charges; they do not show intraminute risk.
11

The ADX gate improves this historical comparison

Without the ADX threshold, the full-period account returns −11.72% with 24.24% H4-close drawdown. Its restarted later account returns −13.04%, versus −3.04% with the gate. Both use the same twenty-eight-bar eligibility, exact closing-price breakouts, center exits, stops, quotes and costs. Here the gate reduces trade frequency and sampled exposure and improves return and drawdown, while the later primary account still loses. This one fixed comparison does not establish a stable future benefit, the best ADX threshold or independence from source and execution assumptions.

Separately restarted historical accounts
Account or scenarioNet return %H4-close drawdown %TradesProfit factorObserved-bucket occupancy %
Envelopes + ADX14≥25 · Continuous 2020–2025+1.2810.341711.0315.78
Envelopes without ADX gate · Continuous 2020–2025−11.7224.243880.8837.92
Envelopes + ADX14≥25 · Restarted 2020–2022+4.4610.34941.1817.49
Envelopes without ADX gate · Restarted 2020–2022+1.5120.362161.0342.25
Envelopes + ADX14≥25 · Restarted 2023–2025−3.045.31770.8514.06
Envelopes without ADX gate · Restarted 2023–2025−13.0414.491720.7033.58
USD cash · zero assumed interest0.000.00——0.00
12

Keep source gaps visible in the trade diagnostics

The model weekly calendar identifies 87,846 unobserved in-session minutes; absence alone does not identify a feed failure, holiday or lack of updates. In the primary full-period ledger, 124 trades cross such minutes, 22 use partial signal buckets and 4 use a stale close proxy. Delayed center exits: 0; period-end last-close fallbacks: 0. Excluding affected trades at their original quantities leaves ledger P&L −952.80 USD; this is an after-the-event diagnostic, not a live avoidance filter or rebuilt account return. Indicator state continues across observed buckets and weekends, while entry crossings require adjacent scheduled anchors. No absent minute or candle is invented.

Data-quality and execution diagnostics
Account or scenarioTrades
Trades crossing unobserved in-session minutes124
Trades using a partial signal bucket22
Trades using a stale signal-close proxy4
Delayed indicator exits0
Period-end last-close fallbacks0
13

Follow the first trade in each restarted period

The first completed early primary trade opens 2020-01-30 16:00 UTC and records +1.536 net R; the first later trade opens 2023-01-19 12:00 UTC and records +0.418 net R. Selection is chronological, not based on later price performance. Actual Bid candles, SMA20, both percentage bands and fixed stop appear above; ADX and both DI lines use a separate 0–100 pane. S marks the completed signal candle, E/X Bid price references. The ledger uses modeled Ask for short liquidation; short stops are plotted as Bid equivalents and fill slippage is accounted for separately. The full chart window is retrospective context, not a forward replay.

First completed early trade

First completed early trade1.293531.301101.308681.316261.32383USD per GBP · observed BidUpper · SMA20 +0.5%SMA20Lower · SMA20 −0.5%Wilder ADX14 / DI · 0–1000255075100ADX14+DI14−DI14SLSEX2020-01-27 12:002020-01-30 00:002020-02-03 04:00

Select a candle with the chart, slider or arrow keys. Prices use five decimals and ADX/DI two. Anchor, scheduled end and first/last actual minutes distinguish availability from coverage. Decisions use unrounded exact band comparisons and Wilder values.

Opening · UTC
2020-01-27 12:00 UTC
Available · UTC
2020-01-27 16:00 UTC
First observed minute · UTC
2020-01-27 12:00 UTC
Last observed minute · UTC
2020-01-27 15:59 UTC
Bid open
1.30849
Bid high
1.30852
Bid low
1.30523
Bid close
1.30553
SMA20 · USD per GBP
1.31035
Upper · SMA20 +0.5%
1.31690
Lower · SMA20 −0.5%
1.30379
Wilder ADX14 · strength
19.02
+DI14 · positive direction
18.61
−DI14 · negative direction
19.83
ATR14 · USD per GBP
0.00306
Observed M1 candles
240
Fixed stop · liquidation quote
1.30374
Trade examples · modeled fills and net R
Opening · UTCModeled entry fillModeled exit fillNet R
2020-01-30 16:00 UTC1.310121.32013+1.536
First completed early trade: 2020-01-30 16:00 UTC, +1.536 net R. Actual Bid candles, SMA20 and percentage bands above; Wilder ADX/DI below. S: completed signal; E/X: Bid references; short stops are shown as Bid equivalents.

First completed later trade

First completed later trade1.209131.218991.228851.238721.24858USD per GBP · observed BidUpper · SMA20 +0.5%SMA20Lower · SMA20 −0.5%Wilder ADX14 / DI · 0–1000255075100ADX14+DI14−DI14SLSEX2023-01-16 08:002023-01-18 20:002023-01-23 04:00

Select a candle with the chart, slider or arrow keys. Prices use five decimals and ADX/DI two. Anchor, scheduled end and first/last actual minutes distinguish availability from coverage. Decisions use unrounded exact band comparisons and Wilder values.

Opening · UTC
2023-01-16 08:00 UTC
Available · UTC
2023-01-16 12:00 UTC
First observed minute · UTC
2023-01-16 08:00 UTC
Last observed minute · UTC
2023-01-16 11:59 UTC
Bid open
1.22304
Bid high
1.22304
Bid low
1.21711
Bid close
1.22038
SMA20 · USD per GBP
1.21904
Upper · SMA20 +0.5%
1.22514
Lower · SMA20 −0.5%
1.21295
Wilder ADX14 · strength
14.23
+DI14 · positive direction
20.54
−DI14 · negative direction
18.43
ATR14 · USD per GBP
0.00515
Observed M1 candles
240
Fixed stop · liquidation quote
1.22583
Trade examples · modeled fills and net R
Opening · UTCModeled entry fillModeled exit fillNet R
2023-01-19 12:00 UTC1.235321.23941+0.418
Chronological selection: 2023-01-19 12:00 UTC, +0.418 net R. E/X show Bid references; short liquidation uses modeled Ask in the ledger. The stop is displayed as a Bid equivalent; fills include adverse slippage separately.
14

Explain the opposite-sign later example

The third chart shows the first later trade with a strictly opposite nonzero net-P&L sign to the first later trade: 2023-01-23 04:00 UTC, −1.000 net R. This selection deliberately uses the outcome to explain a different trade path; it is not a representative sample or independent evidence of profitability. All three trades already belong to the account totals. Opening and modeled minute-close exits have their stated times; a stop inside a minute identifies only that interval, not a known tick execution.

First later trade with the opposite net result

First later trade with the opposite net result1.213871.222421.230971.239521.24807USD per GBP · observed BidUpper · SMA20 +0.5%SMA20Lower · SMA20 −0.5%Wilder ADX14 / DI · 0–1000255075100ADX14+DI14−DI14SLSEX2023-01-18 04:002023-01-20 04:002023-01-23 20:00

Select a candle with the chart, slider or arrow keys. Prices use five decimals and ADX/DI two. Anchor, scheduled end and first/last actual minutes distinguish availability from coverage. Decisions use unrounded exact band comparisons and Wilder values.

Opening · UTC
2023-01-18 04:00 UTC
Available · UTC
2023-01-18 08:00 UTC
First observed minute · UTC
2023-01-18 04:00 UTC
Last observed minute · UTC
2023-01-18 07:59 UTC
Bid open
1.22676
Bid high
1.23353
Bid low
1.22623
Bid close
1.23147
SMA20 · USD per GBP
1.22329
Upper · SMA20 +0.5%
1.22941
Lower · SMA20 −0.5%
1.21718
Wilder ADX14 · strength
17.10
+DI14 · positive direction
26.78
−DI14 · negative direction
12.93
ATR14 · USD per GBP
0.00476
Observed M1 candles
240
Fixed stop · liquidation quote
1.23536
Trade examples · modeled fills and net R
Opening · UTCModeled entry fillModeled exit fillNet R
2023-01-23 04:00 UTC1.243321.23535−1.000
Outcome-conditioned selection: 2023-01-23 04:00 UTC, −1.000 net R. This explains the rule and is not a representative sample. Examples already belong to account totals.
15

Restart accounts and compound yearly marks

Each account includes its start and excludes its end. Cash and positions restart, while valid observed indicator history from before the period remains available. A completed signal at the initial boundary may enter a newly flat account; positions and cash do not transfer from another run. Annual returns compare consecutive year-end liquidation-equity marks and compound rather than add. Open-position marks use the correct modeled exit side, commission, slippage and accrued financing. Occupancy counts observed H4 buckets with any position overlap; it is not exact wall-clock exposure or a continuous maximum-risk measure.

V = B+d×q×(X_liq−E)−2q×commission_per_GBP−q×carry×F

Year-by-year results of the continuous accounts

Year-by-year results of the continuous accounts202020212022202320242025Envelopes + ADX14≥25Envelopes without ADX gate
Year-by-year results of the continuous accounts
YearEnvelopes + ADX14≥25Envelopes without ADX gate
2020+6.36+4.41
2021−2.46−6.85
2022+0.69+4.37
2023−0.17−10.68
2024−0.21−1.29
2025−2.68−1.36
Returns compare consecutive year-end liquidation-equity marks. They compound; restarted early and later accounts use different cash paths.
16

Reproduce the specified adaptation and its limits

Downloads include the frozen rules and pinned manifest, all observed candles and indicator values, eight trade ledgers and standalone replay/checker files. Bands and price comparisons use exact fractions; Wilder ADX and stop ATR use Decimal40 with a separate Decimal50 reconstruction. Source and account checks reuse a separately maintained Forex accounting framework without importing the new main engine. Seeds, gap handling, zero conventions and thresholds are explicit; we do not claim identical outputs on every terminal. Familiar history, one Bid source, modeled Ask, assumed costs and fractional execution limit inference. The small full-period gain, later loss and higher-cost loss do not establish future profitability or actual broker fills.

Run the replay and independent checker with the frozen protocol and original seven annual M1 ZIPs. The replay needs NumPy; source hashes are pinned and every scenario is rebuilt.

python3 gbpusd-envelopes-replay.py --protocol gbpusd-envelopes-protocol.json --raw-dir raw --output replay.json
python3 gbpusd-envelopes-independent-check.py --protocol gbpusd-envelopes-protocol.json --evidence gbpusd-envelopes-evidence.json --raw-dir raw

Frequently asked questions

Was the Envelopes + ADX variant profitable?

The primary full-period account gains +1.28% after baseline costs, but the restarted later account returns −3.04% and the higher-cost full-period run −1.37%. Without ADX, full-period return is −11.72%. The result is mixed and sensitive to period and costs.

Does a 0.5 Envelopes setting mean half a price unit?

No. In a percentage field, 0.5 means 0.5% of SMA20 on each side, or the fraction 0.005. Upper=SMA20×1.005 and Lower=SMA20×0.995. The full width is 1% of the center; it is not fixed in pips or volatility units.

Does an intrabar band touch trigger an entry?

No. A long needs previous close≤previous Upper and current close>current Upper; a short mirrors the lower-band conditions. The just-closed candle must also satisfy the primary ADX gate. We decide from completed H4 data and require the exact next scheduled opening minute.

Does ADX determine whether to buy or sell?

No. The price-band breakout supplies direction. ADX14≥25 is only a strength threshold, including equality; no rising-ADX or +DI/−DI direction gate is added. Both variants retain the same twenty-eight-observation eligibility; only the threshold is removed in the control.

Why can the trade stay open after price returns inside the band?

The frozen indicator exit uses the central SMA20: close≤SMA20 for a long or close≥SMA20 for a short, with equality included. A return merely inside the outer envelope does not meet it. Stops and the earliest time, weekly-close or period-end deadline can still close the position.

Does the 1% stop budget guarantee that every loss stays within that limit?

No. Quantity is also cash-capped, so nominal planned risk can be lower. The budget includes both commissions and exit slippage; financing, opening gaps, missing quotes and actual fills can change the loss. Prices are observed Bid with modeled Ask, and H4-close drawdown is not a continuous worst-case limit.

Primary sources

Download data and reproduction files

Created by the MyProfitFactor editorial team.

Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.

Scope and research limitations

A small full-period gain coexists with a later-period loss and a higher-cost loss. One Bid source, modeled Ask, assumed costs, partial coverage and fractional quantities do not establish actual fills or future returns. Familiar historical periods are not an unseen prospective test.