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 | TIA

Trend Interruption Average displays three lines:

  1. the average number of consecutive rising candlestick Close prices (uptrend)
  2. the average number of consecutive falling candlestick Close prices (downtrend)
  3. the difference of these two streams

It has two input parameters:

  • Period - averaging period
  • Method - averaging calculation method

Calculation:

Up = AvgUp

Down = AvgDown

Difference = AvgUp - AvgDown

where:

AvgUp - MA(Up, Period, Method)

AvgDown - MA(Down, Period, Method)

  • If Close > PrevClose
    Up = PrevUp+1
    Down = 0
  • If Close < PrevClose
    Down = PrevDown+1
    Up = 0

MetaTrader Experts, Indicators, Scripts and Libraries

22922