An RSI recovery can fail before price reverses. A failure swing waits for more: the oscillator leaves an extreme, pulls back without returning to it, then breaks its own rebound level. This educational model adds a completed price break and a short expiry. It defines a hypothesis to test, not a proven edge.
1. Fix the specification before looking for patterns
Use EURUSD, H1, Bid candles and RSI with period 5 on Close. Read only completed bars. The levels 30 and 70, short windows and execution limits below are explicit teaching choices, not preferred settings or optimized parameters. The baseline adds no divergence, support-zone, trend, session or news filter.
A failure swing concerns the oscillator's own sequence. It does not require price and RSI to form opposing pairs of pivots. The divergence guide covers that different comparison. Both methods can fail during persistent trends; combining their labels does not establish independent evidence.
One episode may be active per symbol, with no overlapping BUY and SELL episodes. While a position is open, ignore new patterns. After cancellation, expiry or a consumed trigger, do not reuse that bar to start another episode. Wait for a later fresh extreme crossing while flat. Missing required bar or indicator data cancel an active episode; never substitute zero.
2. Arm BUY, then require a recovery
On completed bar A, arm BUY only on a fresh crossing: previous RSI is ≥ 30 and current RSI is < 30. Freeze A's identity. Further oversold bars do not restart the clock or move A. In the next 4 completed bars, accept the first RSI reading strictly above 30 and below 70; call that recovery bar B.
The fourth bar is eligible. If no recovery occurs by its close, expire the episode. A reading ≥ 70 before recovery cancels it. During this first waiting stage, RSI may remain at or below 30. That allowance ends once B has been accepted. A and B must be different bars.
3. Fix the rebound peak only when it is observable
After B, inspect at most the next 3 completed bars. The first strict fall in RSI from the immediately preceding reading confirms a rebound peak P on the preceding bar. At that confirmation close D, RSI must still be strictly between 30 and 70. Freeze both RSI(P) and the Bid high of P. Do not label P as confirmed on P itself.
Equal consecutive RSI values do not confirm a turn; a later strict fall can fix the last bar of a flat top. If RSI touches or crosses either boundary after B, cancel. If no qualifying decline appears within the window, expire. D is a pullback observation, not an entry signal.
4. Use the first rebound-level break, or discard it
Inspect the next 3 completed bars after D, including the third. RSI must remain strictly between 30 and 70. The first close with RSI(T) > RSI(P) is the only candidate trigger T. On that same bar, require Close(T) > High(P). Equality in either comparison is insufficient.
If RSI breaks its frozen level but price fails its test, cancel the episode immediately. A later price break cannot revive it. Also cancel on a boundary touch; expire after the last eligible bar without a trigger. Test boundary invalidation before accepting a trigger. The recovery, confirmation and trigger are separate observations, never intrabar guesses.
5. Freeze price exits at the trigger close
For BUY, place the planned Bid-triggered SL 1 pip below the lowest Bid low from A through T, inclusive. Freeze TP at the trigger close plus twice its distance to SL: TP = Close(T) + 2 × (Close(T) − SL). Both prices are fixed before inspecting the entry quote; moving the target to rescue a late entry changes the model.
Exit the whole position at the first SL or TP execution. If neither has occurred, request a market exit at the first available quote after 8 H1 bars following the trigger have completed. There is no trailing stop, partial exit, averaging down or RSI-based exit. A gap or unavailable market can delay execution beyond the planned level or time.
The target is a geometric teaching rule, not a forecast or a claim that price will reach it. A nearby opposing level or unsuitable market conditions may motivate another separately specified version; do not add discretionary exceptions to this baseline during a test.
6. Specify SELL rather than guessing a mirror image
- Arm A when previous RSI is
≤ 70and current RSI is> 70. Within the next4bars, the first reading strictly between30and70becomes B. A reading≤ 30before B cancels. - Within the next
3bars after B, the first strict RSI rise confirms trough P on the preceding bar; D is the confirming bar. Freeze RSI(P) and Bid Low(P). Boundary touches after B cancel. - Within the next
3bars after D, use only the firstRSI(T) < RSI(P). RequireClose(T) < Low(P)on the same bar. Reject the episode if price fails; equality is insufficient. The same expiry and bar-reuse rules apply.
SELL exits are Ask-triggered. Set SL above the highest Bid high from A through T by 3 pips: 1 pip of structural buffer plus a 2-pip spread allowance. Set TP = Close(T) − 2 × (SL − Close(T)), also as an Ask level. The allowance is not an Ask-high reconstruction; later spread widening can trigger the stop earlier. Apply the same whole-position and time-exit rules.
7. Evaluate the first executable quote, not the candle close
After T closes and the next H1 bar begins, use the first fresh quote with ready data, no later than 60 seconds after T's close. BUY is assessed at Ask, SELL at Bid. If that first quote fails any gate, consume the episode; do not shop for a better quote. With no ready quote in time, skip. The completed signal bar is shift 1; shift 0 is forming.
Require spread ≤ 2 pips, SL and TP on the correct sides of the quote, and estimated net reward divided by estimated stop loss ≥ 1.5. Include the spread through the actual Bid/Ask prices, round-turn commission and an adverse allowance of 1 pip at entry plus 1 pip at exit in both estimates. Do not add spread a second time. Allowances are modeling inputs, not execution guarantees.
Reserve at most 0.5% of current equity for the new trade and cap combined planned stop risk across the portfolio at 1% of equity. Check broker stop distances, tick value, volume step, margin and trading permission. Round volume down; skip if the minimum permitted volume exceeds the budget. Correlated positions share the aggregate budget. Actual loss can exceed planned risk.
For a symbol with a different contract or account currency, derive loss per lot from valid tick size and tick value in the account currency, including costs. The EURUSD pip value below is an assumption for this example. Use the risk-management guide for the wider sizing process.
8. Reproduce the synthetic EURUSD sequence
These invented Bid candles use one assumed server clock and labels at bar close. The first Open equals the first Close; each later Open is the previous Close. Every High is the larger of Open and Close plus 0.00020; every Low is the smaller minus 0.00020. The path was designed to demonstrate the rule. It is not historical data, a backtest or evidence of profitability.
| H1 close time | Bid close | RSI(5) |
|---|---|---|
00:00 | 1.10000 | — |
01:00 | 1.10100 | — |
02:00 | 1.10060 | — |
03:00 | 1.10140 | — |
04:00 | 1.10100 | — |
05:00 | 1.10160 | 75.000000 |
06:00 | 1.10060 | 53.932584 |
07:00 | 1.09960 | 39.916840 |
08:00 | 1.09860 | 30.129463 |
09:00 | 1.09780 | 24.196597 |
10:00 | 1.09880 | 42.031954 |
11:00 | 1.09920 | 48.133627 |
12:00 | 1.09890 | 43.810393 |
13:00 | 1.09870 | 40.759626 |
14:00 | 1.09960 | 57.433111 |
At 05:00, seed Wilder's average gain and loss with the first 5 close changes: G = 0.0024 / 5, L = 0.0008 / 5, RSI 75. Thereafter update either average with A(k) = (4 × A(k−1) + x(k)) / 5, where x is that bar's gain or loss magnitude, and use RSI = 100 × G / (G + L). Gain and loss are nonnegative. If their sum is zero, skip under this model's missing-value convention. Terminal readings can differ with a different seed or earlier history; match both before comparing values.
A is 09:00, when RSI crosses below 30. B is 10:00. At D, 12:00, the first RSI fall fixes P at 11:00, with RSI 48.133627 and Bid high 1.09940. T at 14:00 has RSI 57.433111 and Bid close 1.09960: both frozen levels are exceeded. Comparisons use unrounded values; the table displays 6 decimals.
The lowest Bid low from A through T is 1.09760, giving SL 1.09750 and TP 1.10380. Only after the 13:00–14:00 bar closes and data are ready can T be acted on. The first quote is assessed in the new bar, never retrospectively at the earlier peak. If filled, the time exit would become due after the bar ending 22:00; no later price path or exit outcome is supplied.
9. Check the arithmetic before choosing volume
Assume a USD account, equity $10,000, contract size 100,000 EUR per lot, 1 pip equal to 0.0001, pip value $10 per lot and a 0.01 lot step. The first ready quote at 14:00:10 is Bid 1.09960 / Ask 1.09972: spread 1.2 pips. Assume $7 round-turn commission per lot, no financing charge for the illustrated calculation, and the stated adverse-fill allowances.
| Check | Calculation | Result |
|---|---|---|
| Risk budget | 10,000 × 0.005 | $50 |
| Loss per lot after allowances and commission | (22.2 + 1 + 1) × 10 + 7 | $249 |
| Potential reward per lot after costs | (40.8 − 1 − 1) × 10 − 7 | $381 |
| Net reward / planned loss | 381 / 249 | 1.530120 |
| Volume rounded down to the step | floor((50 / 249) / 0.01) × 0.01 | 0.20 |
| Planned stop loss at that volume | 0.20 × 249 | $49.80 |
Here the quote passes the ratio gate. A hypothetical Ask of 1.09990 instead gives planned loss $267 and potential reward $363 per lot: 363 / 267 = 1.359551, below 1.5. Reject it even if the oscillator pattern remains visible. Neither the target calculation nor the cost allowance proves that a fill or a profitable exit will occur.
10. Keep the failures in the test record
- A threshold recovery alone: wait for the remaining stages.
- A turn marked before its confirming bar: unavailable information, so no valid decision then.
- A fresh RSI-level break without the same-bar price break: reject permanently.
- A boundary touch, expired stage or missing required observation: cancel or expire as specified.
- A late quote, excessive spread, inadequate net ratio, invalid broker stop or insufficient budget: skip the trade; do not alter the signal.
The chosen period reacts quickly and can generate repeated failures. During a persistent selloff or rally, an oscillator pattern can complete without reversing the larger move. Test such regimes explicitly. The baseline contains no calendar filter: include scheduled announcements, unscheduled news, rollover and gaps in its risk analysis. Any session or news exclusion must be defined and logged as a different tested version.
11. Preserve chronological state in an EA and in testing
Store symbol, H1, rule version and A's opening timestamp as the episode identifier. Persist the stage, deadlines, frozen P, exits and consumed flag. Process each completed bar once. Distinguish the analytical trigger, the order request and the confirmed fill; reconcile open orders and history after a restart or uncertain response before sending anything again. A timeout is not proof that no order exists.
After a rejection with known order state, this baseline does not retry that episode. After an uncertain request, reconcile rather than submit a second request. If actual slippage exceeds the allowance, record the breach and reconcile actual exposure; never expand volume or widen SL to conceal it. This article is a specification, not tested EA source code.
First validate RSI initialization, strict comparisons, stage deadlines, first-break rejection, SELL logic and bar shifts against a chronological log. Then evaluate the complete trading hypothesis with broker-relevant Bid/Ask data, commissions, financing, adverse fills and missed entries. If both exits fall inside one OHLC bar, use tick order where available; otherwise flag the ambiguity and report a conservative SL-first assumption.
Keep development and later evaluation periods separate, retain every tried variant and compare net returns, drawdown, exposure, trade count and uncertainty together. Forward validation uses new incoming data; it cannot guarantee live results. Our MT4 backtesting guide explains the broader process, while the momentum-combination guide separates persistent conditions from fresh events. No win rate or return is claimed here.
12. RSI failure swing questions
Is a failure swing the same as RSI divergence?
No. This model tests the RSI sequence and a frozen price reference. It does not compare two matched price pivots with two oscillator pivots. Adding divergence requires another definition and availability timeline.
Can I enter as soon as RSI leaves oversold?
That only identifies B. A confirmed rebound peak, a qualifying pullback, the first later RSI break and same-bar price confirmation are still required. The executable quote must also pass the cost and risk gates.
What if price breaks one bar after RSI?
Reject the episode if price failed on the first RSI-break bar. This baseline has no waiting period after that event, so the later price break cannot revive it.
Are these RSI settings recommended for live trading?
No. They make the teaching specification and synthetic arithmetic reproducible. Other periods, levels or waiting windows are different variants to document and validate, not automatic improvements.
Does the planned risk cap bound the actual loss?
No. Gaps, spread changes, unavailable liquidity and execution failures can exceed the estimate. Position size, portfolio exposure and the handling of uncertain order state remain separate responsibilities.
Has the example demonstrated a profitable trade?
No. The supplied path stops at the trigger. It demonstrates pattern availability, fixed levels and quote eligibility. No subsequent fill or exit outcome, historical test or live performance is presented.
13. Technical reference and scope
The official MetaTrader 4 RSI reference describes the oscillator and its swing interpretation. The period, finite-stage rules, price condition, stops, target and cost gates in this article are our explicit educational specification. They are not vendor-endorsed trading parameters.
Forex and leveraged trading involve substantial risk. This strategy is educational, not investment advice. Past or simulated results do not guarantee future performance.