Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Telegram !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Indicateurs

Volatility Regime Shader - indicateur pour MetaTrader 5

Osazee Asikhemhen
Osazee Asikhemhen
- MQL4 & MQL5 programming
- Pine script programming
- CAlgo Programming
- Full Stack Web development
Vues:
102
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Volatility Regime Shader classifies market volatility into three regimes and shades the chart background accordingly. Instead of comparing ATR to a fixed value, it calculates the percentile rank of the current ATR within a lookback window. A percentile of 90 means the current ATR is higher than 90% of the values in that window, so the reading adapts automatically to any symbol and timeframe.

Bars at or below the Compression threshold are shaded light blue, and bars at or above the Expansion threshold are shaded light red. Normal bars are left unshaded by default. A label in the upper-right corner shows the current regime and ATR percentile.


The regimes can be used as a filter for other strategies. Compression phases often come before breakouts, so breakout systems can wait for compression before arming. Expansion phases favor trend continuation and wider stops, while mean-reversion entries are usually safer in compression or normal conditions.

                   

Input Description
ATR period Period of the ATR used to measure volatility. Default 14.
Percentile lookback Number of previous bars the current ATR is ranked against. Default 100.
Compression at or below percentile Percentile at or below which a bar is classified as Compression. Default 20.
Expansion at or above percentile Percentile at or above which a bar is classified as Expansion. Default 80.
Bars to calculate and shade How many recent bars are calculated and shaded. Default 3000.
Compression / Expansion / Normal shade Background colors for each regime.
Shade Normal regime Also shades Normal bars when enabled.
Show current regime label Shows the current regime and ATR percentile in the upper-right corner.
Pop-up / push / sound alerts Alerts when a newly closed bar starts a different regime.


Expert Advisors can read two buffers with iCustom. Buffer 0 holds the ATR percentile (0 to 100) and buffer 1 holds the regime code: 0 for Compression, 1 for Normal and 2 for Expansion. Both values are also visible in the Data Window. The values of the forming bar update with price, while alerts use closed bars only.

Session Sweep Boxes Session Sweep Boxes

Draws Asian, London and New York session range boxes and marks liquidity sweeps: a closed bar that wicks beyond a completed session's high or low and closes back inside. Non-repainting arrows, extended session levels, alerts and iCustom-ready buffers.

AN Guard Lite - Trade Journal and Report for any EA AN Guard Lite - Trade Journal and Report for any EA

Writes a CSV journal of every trade with the exit reason, and a report that shows how far each trade ran, in R. It never trades.

ATR Candle Strength ATR Candle Strength

Shades the chart background by volatility regime (Compression, Normal, Expansion) based on the percentile rank of the current ATR. Shows the current regime on the chart, alerts on regime changes and exposes buffers for Expert Advisors.

Watchlist Chart Opener Watchlist Chart Opener

Opens charts for all Market Watch symbols or a custom symbol list in one click, on any timeframe, with an optional template applied to each chart. Skips charts that are already open and limits how many are opened at once.