Blog / Strategy
Strategy

Internal Bar Strength Reversion

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Internal Bar Strength Reversion strategy is a counter-trend, mean-reversion system built around Internal Bar Strength (IBS) — a simple, scale-free momentum gauge — combined with an Average True Range (ATR) volatility filter for risk sizing. IBS measures where a candle closes inside its own high-to-low range: a value near 0.0 means price slammed shut on the low of the bar, while a value near 1.0 means it ramped into the high. Because IBS uses only the geometry of a single bar and no absolute price levels or moving averages, it behaves consistently across different currency pairs and timeframes.

Mean reversion is the idea that after a market pushes to a short-term extreme, price often "snaps back" toward a more neutral state. This strategy is designed for range-bound or oscillating market conditions rather than strong, sustained trends. When a market repeatedly closes near the low of each bar, sellers may be exhausting themselves at the edge of the tape, and short-horizon returns historically tend to recover — the mirror logic applies to a market closing near its highs.

As a learning tool, this strategy is well suited to traders who want to study how a pure price-geometry oscillator behaves and how a disciplined "wait for the turn" trigger differs from blindly fading every extreme candle. It is not a shortcut to results; it is a structured example of counter-trend logic with clearly defined, ATR-based risk. Beginners can use it to understand oscillator thresholds, crossing signals, and reward-to-risk exits, while more experienced traders can use it as a framework for parameter experimentation.

How It Works

Rather than fading a single extreme bar — which can keep bleeding as a market trends — the strategy smooths IBS over a short window into an oscillator and waits for that oscillator to cross back out of an extreme zone. That recovery cross is the first sign that internal pressure is releasing, giving a defined turning point instead of trying to catch a falling knife.

The strategy processes one signal per completed bar. Here is what it does:

Stop-loss logic: When a trade is opened, the strategy measures current volatility with ATR and places the stop a fixed number of ATRs away from entry. The stop distance equals AtrStopMult × ATR. For a long, the stop sits below entry; for a short, it sits above. This ties risk to live market volatility rather than a fixed pip count.

Take-profit logic: The take-profit is placed a reward-to-risk multiple of the stop distance away from entry. With the default RewardRisk of 1.5, the target is 1.5 times the stop distance in the favorable direction. If the stop is 30 pips away, the target is 45 pips away. Both the stop and target are set at entry, so each trade has a predefined risk and reward before it begins.

Because entries only fire on the recovery cross and never while a position is already open, the logic stays selective and avoids piling into the same move repeatedly.

internal bar strength mean reversion
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
IbsPeriod 10 3 40 Number of completed bars used to smooth raw IBS into the oscillator. Larger values produce a slower, steadier oscillator; smaller values react faster.
LowThreshold 0.35 0.10 0.45 The oversold-zone top. The smoothed oscillator must recover up through this level to trigger a long. Lower values demand a deeper extreme before buying.
HighThreshold 0.65 0.55 0.90 The overbought-zone floor. The smoothed oscillator must roll down through this level to trigger a short. Higher values demand a more stretched extreme before selling.
AtrPeriod 14 5 40 The look-back window for the ATR calculation used to size the stop-loss.
AtrStopMult 1.5 0.5 4.0 Stop distance expressed as this many ATRs from the entry price. Higher values give the trade more room but larger risk per trade.
RewardRisk 1.5 0.5 5.0 Take-profit distance as a multiple of the stop distance (reward-to-risk ratio).
Lots 0.10 0.01 1.0 Trade volume in lots. Should be sized to your account and risk tolerance.
internal bar strength mean reversion — MQL5 source code

Recommended Chart Settings

The Internal Bar Strength Reversion strategy is designed to run on a single timeframe — every calculation uses the chart's primary symbol and period. Because IBS is scale-free, the logic can be applied across major forex pairs, but mean-reversion behavior tends to be more reliable on liquid pairs with clear ranging tendencies, such as EUR/USD, and on intraday-to-swing timeframes like the H1 (1-hour) or H4 (4-hour) charts.

Start by testing the defaults on a single pair and timeframe, then study how the oscillator's threshold crossings line up with actual reversals. Keep in mind that results will vary significantly across different market conditions — a setting that behaves one way in a quiet range may behave very differently during a strong trend or a volatile news period. Always validate any configuration on historical data and a demo account before considering live use.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Every strategy involves trade-offs. Understanding them is part of trading responsibly.

Strengths of this approach:

Known limitations:

This is a framework for study and experimentation, not a finished, guaranteed system. Treat it as a starting point for your own research.

Risk Management Tips

Sound risk management matters more than any single entry signal. Consider these general principles:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog