Blog / Strategy
Strategy

Inside Bar Momentum

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?

Inside Bar Momentum is a candlestick-pattern breakout strategy that combines the classic two-bar inside bar formation with an RSI (Relative Strength Index) momentum filter. The inside bar is a price pattern where one candle's entire high-to-low range sits fully inside the range of the candle before it — a visual sign that volatility has compressed, like a spring coiling before it releases. The RSI is a momentum oscillator that ranges from 0 to 100 and measures the speed and direction of recent price changes. By marrying the two, the strategy attempts to trade the expansion out of that coil only when momentum agrees with the breakout direction.

The strategy is designed for momentum-prone markets in a directional phase rather than flat, range-bound conditions. The inside bar pattern on its own is well known for producing false breaks during choppy, indecisive markets — price pokes through the breakout level and then snaps back. The RSI gate exists specifically to filter those fakeouts: a break is only taken when momentum is leaning in the same direction as the break. This makes it a study in how a confirmation filter can address a pattern's classic weakness.

As a learning tool, Inside Bar Momentum is well suited to traders who want to understand how volatility-compression patterns interact with momentum confirmation, and how to build volatility-adaptive risk using the ATR (Average True Range) indicator. It is presented here for educational analysis of the logic — not as a profit opportunity. The goal is to help you understand why each rule exists and how the pieces fit together.

How It Works

The strategy reads the two most recently closed candles on the chart's timeframe and looks for a qualifying inside bar setup. It then "arms" a breakout zone and waits for price to expand. Here is the full flow in plain English:

Detecting the coil (the setup):

Entry conditions (a market order on the break, not a resting pending order):

Exit conditions — stop-loss and take-profit:

Breakeven management:

inside bar momentum MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
RsiPeriod 14 5 30 Lookback period for the RSI momentum gate.
RsiBuffer 3.0 0.0 15.0 How far above/below the RSI 50 mid-line momentum must lean before a break is permitted.
AtrPeriod 14 5 30 ATR window used to size the stop, target, and breakeven distances.
SlAtrMult 1.2 0.5 4.0 Stop-loss distance as a multiple of ATR.
TpAtrMult 2.4 0.5 6.0 Take-profit distance as a multiple of ATR.
BeAtrMult 1.0 0.0 3.0 Move the stop to breakeven after this many ATR of favourable travel (0 = off).
MinMotherAtrMult 0.6 0.0 2.0 Minimum mother-bar width, in multiples of ATR, for the coil to count as a real range.
ExpiryBars 4 1 10 Number of bars an un-triggered armed coil stays active before it is cancelled.
Lots 0.10 0.01 1.00 Trade volume in lots.
Magic 7314 0 9,999,999 Unique identifier so the EA only manages its own positions.
inside bar momentum MT5 EA — MQL5 source code

Recommended Chart Settings

Inside Bar Momentum was designed with a momentum-prone major pair in mind — such as EURUSD or GBPJPY — on the M15 or H1 timeframe. These markets tend to produce clean directional expansions out of compression, which is the behaviour the strategy is built to capture.

The strategy is single-timeframe by design: every calculation uses the chart's own timeframe, so it will run on whatever timeframe you attach it to. That flexibility comes with a caveat — results will vary considerably across different symbols, timeframes, and market conditions. A setting that behaves well on one pair during a trending phase may behave very differently on another pair or during a quiet, range-bound period. Always test any combination thoroughly before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every strategy, Inside Bar Momentum has both strengths and limitations worth understanding before you study it on a live or demo chart.

Strengths of this approach:

Known limitations:

This is an analytical framework for learning, not a finished system. Understanding when it may underperform is as valuable as understanding when it may signal cleanly.

Risk Management Tips

Sound risk management matters more than any single entry rule. As you study this strategy, keep these general principles in mind:

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