Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | TMAGi

TMAGi is an oscillator based on three moving averages and the +DI and -DI lines of the ADX indicator. It indicates the market state: uptrend/downtrend/flat.

There are seven configurable parameters:

  • ADX period - ADX calculation period
  • Fast MA period - fast MA calculation period
  • Middle MA period - middle MA calculation price
  • Slow MA period - slow MA calculation price
  • SMA slowing - SMA smoothing period
  • LWMA slowing - LWMA smoothing period
  • Applied price

Calculation:

TSMAGi = SMA(RAW, SMA slowing) TLWMAGi = LWMA(RAW, LWMA slowing)

where:

RAW = (Abs(FastMA - MiddleMA) + Abs(FastMA - SlowMA) + Abs(MiddleMA - SlowMA))*DI

FastMA = SMA(Applied price, Fast MA period) MiddleMA = SMA(Applied price, Middle MA period) SlowMA = SMA(Applied price, Slow MA period)

DI = PlusDI - MinusDI PlusDI,  MinusDI - +DI and -DI lines of ADX(ADX period)

MetaTrader Experts, Indicators, Scripts and Libraries

21843