Blog / Strategy
Strategy

Bar Value Trend Shift

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 Bar Value Trend Shift strategy is a momentum-and-pressure trading system built around the Rex Oscillator, a classic indicator introduced by Jack Hutson that measures the "True Value of a Bar" (TVB). Rather than looking only at how far price moved from open to close, this oscillator reads the entire candle — open, high, low, and close — to gauge who was really in control during each bar. The trading style here is trend-following with a crossover trigger: the strategy watches for a genuine shift in market pressure and acts on it, while filtering out weak, indecisive signals near the neutral zone.

At its core, the Rex Oscillator asks a simple question about every completed candle: did the market close near the top of its full range (bullish conviction) or near the bottom (bearish conviction)? A candle that finishes high in its range, above its open, with only a small upper wick, generates a strongly positive reading. A candle that collapses to close near its low produces a strongly negative reading. Balanced or "doji" bars — where buyers and sellers fought to a draw — sit close to zero. By folding rejection tails (the upper and lower wicks) into the calculation, the indicator captures information that body-only pressure gauges ignore.

This strategy is best suited as a learning tool for traders who want to understand how full-OHLC pressure analysis differs from simple close-based momentum, and how a fast/slow oscillator crossover can be filtered with volatility to reduce noise. It is designed to identify markets that are beginning to trend with one-sided conviction, and it deliberately stays out of choppy, directionless conditions. It is not a shortcut or a promise — it is a structured framework for studying how trend shifts can be detected and traded systematically.

How It Works

The strategy processes one completed bar at a time and builds a two-layer oscillator before checking for a trade. Here is the full logic in plain English:

Entry conditions (the strategy signals a trade only when both parts are true):

Exit conditions:

Because entries fire only on completed bars and require a real crossover plus a volatility-cleared threshold, the strategy aims to avoid the constant whipsaw that pure zero-line oscillators can suffer from.

Bar Value Trend Shift EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
RexPeriod 8 3 40 Number of bars used to smooth the raw True-Value-of-a-Bar pressure into the Rex line. Lower values react faster; higher values are smoother.
SignalPeriod 5 2 25 Number of Rex values averaged to form the slower signal baseline that the pressure line crosses.
PressureAtrFraction 0.10 0.0 1.0 Zero-line dead-band. The Rex line must clear this fraction of ATR before a crossover counts as a valid signal. Higher values filter more aggressively.
AtrPeriod 14 5 40 Lookback length for the Average True Range, used both for the threshold and for stop/target sizing.
AtrSlMult 2.0 0.5 6.0 Stop-loss distance expressed as a multiple of ATR.
AtrTpMult 3.0 0.5 10.0 Take-profit distance expressed as a multiple of ATR.
Lots 0.10 0.01 1.0 Fixed position size in lots for each trade.
Bar Value Trend Shift EA — MQL5 source code

Recommended Chart Settings

The Bar Value Trend Shift EA is designed to run on a single timeframe — whatever chart you attach it to becomes its working timeframe, since every calculation uses the chart's symbol and period. For studying its behavior, many traders begin with major forex pairs such as EUR/USD or GBP/USD on the H1 (1-hour) or H4 (4-hour) timeframes, where trends tend to develop with enough follow-through for an ATR-based stop and target to make sense.

That said, the default parameters are a starting point, not an optimized configuration. The oscillator's responsiveness (RexPeriod and SignalPeriod) and the dead-band filter (PressureAtrFraction) interact strongly with the volatility of the instrument you choose. Results will vary considerably across different symbols, timeframes, and market conditions, so treat any single setting as a hypothesis to be tested rather than a finished answer.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like every mechanical system, the Bar Value Trend Shift strategy has clear strengths and equally clear limitations that you should understand before relying on it.

Strengths. The use of the full OHLC range gives the Rex Oscillator a richer view of each bar than close-only momentum tools — it "sees" rejection wicks and where the close landed inside the range, which can help it register conviction earlier. The ATR-scaled dead-band is a thoughtful filter: it prevents the strategy from firing on trivial crossovers that occur when the market has no real direction. And because stops and targets are volatility-scaled rather than fixed, the risk framework adapts automatically as conditions change.

Limitations. Any crossover system is inherently a lagging approach — by the time the Rex line crosses its signal and clears the threshold, part of the move may already be complete. In sideways, range-bound markets, even a filtered oscillator can generate a series of losing signals as pressure flips back and forth. The stop-and-reverse logic, while keeping the strategy aligned with fresh signals, can compound losses during choppy periods by repeatedly flipping direction. The strategy also holds no more than one position at a time per symbol and uses a fixed lot size, so it does not scale exposure to conviction or account equity on its own.

Where it may underperform. Expect the weakest behavior in low-volatility consolidation, during news-driven spikes that gap through stops, and on instruments with wide spreads relative to their typical ATR. Historically, trend-following crossover systems tend to give back open profit during the transition from a trend back into a range. None of this makes the approach "bad" — it makes it a tool with a specific job. Understanding that job is the whole point of studying it.

Risk Management Tips

Sound risk management matters far more than any single indicator setting. Keep these general principles in mind as you study this strategy:

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