Guarda come scaricare robot di trading gratuitamente
Ci trovi su Twitter!
Unisciti alla nostra fan page
Script interessante?
Pubblica il link!
lasciare che altri lo valutino
Ti è piaciuto lo script? Provalo nel Terminale MetaTrader 5
Indicatori

SuperTrend Indicator - indicatore per MetaTrader 5

Syed Jawad Hussain Naqvi
Syed Jawad Hussain Naqvi
  • Founder & Quant Developer al  Kernelis Capital
  • Pakistan
  • 989
Quantitative Developer 🇵🇰
• MQL5 Author — algorithmic trading systems built on statistical modeling, recursive signal processing, and quantitative market analysis
• Technical skills: MQL5, Python, C++, statistical modeling, competitive programming
Visualizzazioni:
186
Valutazioni:
(1)
Pubblicato:
Freelance MQL5 Hai bisogno di un robot o indicatore basato su questo codice? Ordinalo su Freelance Vai a Freelance

SuperTrend Indicator — Detailed Description

A complete SuperTrend indicator implementation for MetaTrader 5, built from first principles rather than adapted from an existing template. The indicator combines three core ideas: a volatility-scaled envelope derived from ATR (Average True Range), a ratchet mechanism that only ever tightens the band in the trend's favor rather than jumping around with every new bar, and a binary trend flag that flips only when price genuinely closes through the band on the opposite side.

What sets this implementation apart is how its internal recursive state is handled. Rather than storing the band's memory in plain, manually-managed arrays — a common source of subtle bugs where state can silently reset or lose continuity across bars — the internal upper-band, lower-band, and trend-flag values are registered as proper indicator calculation buffers (INDICATOR_CALCULATIONS). This hands their sizing and bar-to-bar persistence over to the terminal itself, eliminating an entire category of bug that can otherwise cause a SuperTrend line to behave erratically, particularly during backtesting.

The indicator uses consistent series indexing throughout, with a deliberate seeding process on first load that establishes the recursive state from the oldest usable bar in the available history, rather than assuming zero or default values. Buy and sell arrows are only plotted after a trend reversal is confirmed on a bar that is no longer at risk of being reprocessed — a small but important detail that prevents an arrow from appearing and then vanishing on the next tick, which is a common visual bug in less careful implementations.

This indicator was built, reviewed, and refined through multiple rounds of technical review as part of the "Making Custom Indicators for Beginners" article series, where every design decision — including a real, documented bug in an earlier version and its fix — is explained in full. It is provided here as a clean, standalone, non-repainting SuperTrend implementation suitable for direct use or as a reference for anyone building their own custom trend indicators in MQL5.


Wolfe Wave Dashboard Wolfe Wave Dashboard

Professional MQL5 indicator (separate window) that automatically scans multiple symbols and timeframes, detects the most recent valid Wolfe Wave patterns (bullish/bearish), displays them in an interactive dashboard, and allows one-click chart opening with full pattern drawing.

HybridMicrostructure EA HybridMicrostructure EA

The Hybrid Microstructure EA is an advanced, high-frequency scalping Expert Advisor designed specifically for XAUUSD (Gold) on the M1 timeframe. Unlike traditional indicators that rely on lagging OHLC mathematics, this EA operates on Tick-Level Microstructure Dynamics—tracking tick velocity, volume-weighted average price (VWAP) deviations, and liquidity sweep rejections (stop hunts) executed by institutions.

Fisher Transform Indicator Fisher Transform Indicator

A Fisher Transform oscillator built from statistical first principles — normalizing price into a bounded range, then applying a logarithmic transform to produce sharp, well-defined reversal signals instead of the gradual turns typical of conventional oscillators. Internal recursive state is handled through proper calculation buffers for reliable, correct behavior across backtests. From the article series "Making Custom Indicators for Beginners."

MACD Signals MACD Signals

Indicator edition for new platform.