Trend Survival States

Trend Survival States for MetaTrader 5 — a free market regime indicator measuring bull and bear pressure with adaptive volatility bands and a five-state trend classification

Bull and bear pressure, an adaptive-band spread, and a five-state market classification, free for MT5. It measures the buying and selling pressure behind the current move and classifies that into a market state: strong bull, weak bull, neutral, weak bear, strong bear.

This is a complete regime indicator, not a time-limited trial and not a crippled demo. Everything drawn on the chart is the full calculation.

What the paid version adds. Trend Survival Rate reports how often the current state has survived to the next bar, and scores that forecast against what actually happened using a Brier score. Those two numbers, and the settings that govern them, are what this free version does not include. Everything else is identical — and both can run on the same chart at the same time, so the difference is visible rather than described.

How it works

Two pressure components are computed from price: an upper envelope and a lower one, each measured over a lookback window. The difference between them is the spread, and its sign says which side is dominant. Adaptive standard-deviation bands over the spread say whether that dominance is ordinary or unusual for this instrument.

Sign and bands together classify every completed bar into one of five states. The sign decides direction; the bands decide conviction.

A note on the envelope mapping, because it is counter-intuitive and worth stating: the upper envelope is a ceiling that sits far above price during a downtrend, so its variance measures bear pressure. The lower envelope is a floor that lags below price during an uptrend, so it measures bull pressure. The crossed mapping is deliberate and correct.

Input series is close . Not high/low — the extremes already capture excursion, and using high/low would double-count it. Stated here so the values can be reproduced.

The dashboard

Bull and bear pressure are shown as percentage shares of total pressure, not as raw values. The raw terms carry the instrument's price units: the same reading is 28.48 on gold and 0.0003 on EURUSD, and on a low-priced cross both round to zero while still being meaningfully different. The shares are the comparable quantity, so the shares are what the dashboard shows. Balance runs from −100 (all bear) through 0 (even) to +100 (all bull), and reads the same on every instrument and timeframe.

The dashboard also reports the current state and how many bars it has held. The raw values remain available in the buffers for an Expert Advisor that wants them.

Calculation behaviour

Values are calculated from completed bars. Closed values do not repaint.

The five-state classification is not symmetric in duration — a neutral reading can persist for many bars on a quiet instrument, and a strong state can last one bar. The state age field on the dashboard is there so this is visible rather than inferred.

Inputs

  • Pressure lookback — the window for both envelope components. Default 21.
  • Signal line period — smoothing for the signal line. Default 9.
  • Spread smoothing — 1 turns it off. Default 5, chosen by measurement: at 20 the states barely changed, at 1 the spread was too jagged for the strong/weak comparison.
  • Bands period and band width — the window and width that decide conviction. Default 20 and 1.0 — one standard deviation, the boundary of ordinary variation.
  • Dashboard — show or hide, place it on the price chart or in the indicator window, text size, colours and offsets.

The settings that govern the survival rate and the forecast score are not shown in this version, because this version does not compute them. A control that changes nothing is worse than an absent one.

Buffers for Expert Advisors

Nine plots, seven drawn and two data-only. All nine are readable with iCustom() and CopyBuffer() , and all nine appear in the Data Window.

  • Buffer 0 — Bull Pressure
  • Buffer 1 — Bear Pressure
  • Buffer 2 — Signal
  • Buffer 3 — Spread (bull − bear)
  • Buffer 4 — colour index for the spread histogram, not a data series
  • Buffer 5 — Upper Band
  • Buffer 6 — Band centre
  • Buffer 7 — Lower Band
  • Buffer 8 — State: 2 = strong bull, 1 = weak bull, 0 = neutral, −1 = weak bear, −2 = strong bear
  • Buffer 9 — State age, bars the current state has held

Read shift 1 — the last fully closed bar — for values that will not change.

In Trend Survival Rate, buffer 9 is the survival rate and buffer 10 the forecast score, with state age at 11. An EA written against this free version reads buffers 0 to 8 identically in both, so the shared series need no code changes; only the survival buffers differ in position.

What the screenshots show

  • US30 Daily — the Trend Survival States settings dialog and Data Window, closed 14 August bar. Nine rows, ending at state age.
  • XAUUSD Daily — Trend Survival States and Trend Survival Rate on one chart, in separate windows. Same bar, same settings. The pressures, spread and bands are identical in both; the paid version adds the survival rate and the forecast score.
  • US30 Weekly — both versions on a clean uptrend, with the state reading NEUTRAL. The state and the trend are different questions.
  • Tesla Daily — a ranging instrument, where the states change often.
  • DAX (DE30) Daily — the same defaults on an index, no re-tuning.
  • EURUSD Daily — a major pair.
  • BTCUSD Daily — a state transition, with the hold counter resetting.
  • US30 Daily — the Trend Survival Rate settings dialog and Data Window, same bar, for comparison: eleven rows, and the survival settings this free version does not carry.

Notes

  • Separate indicator window, 7 drawn plots and 2 data-only.
  • No external dependencies. Everything is calculated inside the indicator; it calls no other indicator.
  • Multiple instances on one chart are supported. Two copies with different settings each keep their own dashboard. Two copies with identical settings share one: MetaTrader loads the program once and serves both windows from it, so there is a single dashboard to draw. The plots are unaffected either way.
  • This version and Trend Survival Rate use different program names, so they run side by side without interfering with each other.

This indicator is a tool for technical analysis and market-condition measurement. It is not a trading system, it does not generate trading signals, it does not provide investment advice, and it does not open or manage trades automatically. No performance claims are made for it.

More tools from this developer

I build MT5 indicators and Expert Advisors with an emphasis on clean, documented, no-repaint code — closed-bar logic, validated buffers, and no dependencies on other indicators.

See all published products →

Questions about the calculation, the states, or using this in your own EA? Send me a private message — I am happy to answer.

Developed and maintained by Narayanan Mohanan, MT5/MQL5 Developer.

More from author
Anchored Volume Delta with Adaptive Bands
Narayanan Mohanan Mohanan Krishnan
This indicator plots Cumulative Volume Delta (CVD) — the running total of each bar's volume, signed by the direction the bar closed — inside adaptive standard-deviation bands. It answers a question price alone does not: is the move being carried by participation, or is it drifting? The cumulative total restarts at an anchor you choose — daily, weekly or monthly — so the reading is always relative to the current session, week or month rather than to the beginning of chart history. That single con
FREE
MTF Currency Strength Panel MT4
Narayanan Mohanan Mohanan Krishnan
MTF Currency Strength Panel for MetaTrader 4 A multi timeframe currency strength meter covering all 28 major forex pairs on one chart. This currency strength panel shows where the eight major currencies stand right now, and how each of the 28 major pairs has been moving across nine timeframes at once — M1 to MN1. Both readings sit on one chart, updated on a timer. Ranking pairs on their own is misleading. When a single currency moves, every pair containing it moves with it, so the top of a pair
FREE
Multi Timeframe Currency Strength Panel
Narayanan Mohanan Mohanan Krishnan
MTF Currency Strength Panel for MetaTrader 5 A multi timeframe currency strength meter covering all 28 major forex pairs on one chart. This currency strength panel shows where the eight major currencies stand right now, and how each of the 28 major pairs has been moving across nine timeframes at once — M1 to MN1. Both readings sit on one chart, updated on a timer. Ranking pairs on their own is misleading. When a single currency moves, every pair containing it moves with it, so the top of a pair
FREE
Force Index with Adaptive Volatility Bands
Narayanan Mohanan Mohanan Krishnan
This indicator plots the Force Index — each bar's price change multiplied by its volume — inside adaptive standard-deviation bands. Where price alone tells you that a market moved, the Force Index tells you how much effort went into moving it. A large price change on thin volume and a small change on heavy volume are very different events, even when the candles look similar. The Force Index separates them by combining both into a single reading, and the bands place that reading in the context of
FREE
This indicator plots Cumulative Volume Delta (CVD) — the running total of each bar's volume, signed by the direction the bar closed — inside adaptive standard-deviation bands. It answers a question price alone does not: is the move being carried by participation, or is it drifting? The cumulative total restarts at an anchor you choose — daily, weekly or monthly — so the reading is always relative to the current session, week or month rather than to the beginning of chart history. That single con
FREE
This indicator plots the Force Index — each bar's price change multiplied by its volume — inside adaptive standard-deviation bands. Where price alone tells you that a market moved, the Force Index tells you how much effort went into moving it. A large price change on thin volume and a small change on heavy volume are very different events, even when the candles look similar. The Force Index separates them by combining both into a single reading, and the bands place that reading in the context of
FREE
OBVCD Pro MT4
Narayanan Mohanan Mohanan Krishnan
OBVCD Pro is a momentum oscillator that applies convergence/divergence analysis to On-Balance Volume (OBV) instead of price, combining adaptive volatility bands with a 5-state regime classifier that can be read visually on the chart or consumed directly by an Expert Advisor. Most classical oscillators analyse price alone. OBVCD Pro calculates convergence and divergence from cumulative volume flow, so it measures the participation behind a market move rather than only the movement itself. The res
Currency Strength Oscillator MT4
Narayanan Mohanan Mohanan Krishnan
Currency Strength Oscillator for MetaTrader 4 A relative currency strength indicator that plots the history of the eight majors. This currency strength oscillator plots the relative strength of the eight major currencies as a history, decomposed from the 28 major pairs. While a standard currency strength meter tells you where things stand right now, this shows how they got there — which currency has been strengthening, which has rolled over, and where the ranking changed hands. All eight series
Oscillator Regime Suite MT4
Narayanan Mohanan Mohanan Krishnan
This indicator applies the convergence/divergence construction — fast moving average minus slow, with a signal line — to a volume-derived series rather than to price. Three sources are selectable: Cumulative Volume Delta, Force Index, and On Balance Volume. Adaptive volatility bands are drawn over the result, and every completed bar is classified into one of five regime states. That state is exposed as a numeric buffer, so an Expert Advisor can read it directly. Why the source matters A standard
OBVCD Pro
Narayanan Mohanan Mohanan Krishnan
OBVCD Pro is a momentum oscillator that applies convergence/divergence analysis to On-Balance Volume (OBV) instead of price, combining adaptive volatility bands with a 5-state regime classifier that can be read visually on the chart or consumed directly by an Expert Advisor. Most classical oscillators analyse price alone. OBVCD Pro calculates convergence and divergence from cumulative volume flow, so it measures the participation behind a market move rather than only the movement itself. The res
Currency Strength Oscillator MT5
Narayanan Mohanan Mohanan Krishnan
This indicator plots the relative strength of the eight major currencies as a history, decomposed from the 28 major pairs. A panel tells you where things stand now. This shows how they got there — which currency has been strengthening, which has rolled over, and where the ranking changed hands. All eight series are exposed as documented indicator buffers, so an Expert Advisor can read currency strength directly. How the decomposition works Each of the eight currencies appears in seven of the twe
Oscillator Regime Suite
Narayanan Mohanan Mohanan Krishnan
This indicator applies the convergence/divergence construction — fast moving average minus slow, with a signal line — to a volume-derived series rather than to price. Three sources are selectable: Cumulative Volume Delta, Force Index, and On Balance Volume. Adaptive volatility bands are drawn over the result, and every completed bar is classified into one of five regime states. That state is exposed as a numeric buffer, so an Expert Advisor can read it directly. Why the source matters A standard
Structure Flow and Trailing Stop
Narayanan Mohanan Mohanan Krishnan
This indicator draws two lines on the price chart: an adaptive flow line that follows the market's direction, and a trailing stop that moves only in that direction and never back. A small panel reports the state behind them. The trailing stop can be calculated five different ways. These are not variations on one idea — each anchors to something different, and on the same chart they frequently disagree. The flow line An adaptive average. It smooths heavily when price is rotating and lightly when
Trend Survival Rate
Narayanan Mohanan Mohanan Krishnan
Trend Survival Rate for MetaTrader 5 — a market regime indicator that measures how often the current trend state has survived to the next bar, and scores its own forecast Trend survival rate, market state classification and a live Brier forecast score, in one MT5 indicator window. It measures the buying and selling pressure behind the current move, classifies that into a market state, and reports how often that state has survived to the next bar — then grades its own forecast against what actual
Filter:
No reviews
Reply to review