MetaTrader 5 / Indicateurs

TIA - indicateur pour MetaTrader 5

6498
(11)

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

Traduit du russe par MetaQuotes Ltd.
Code original : https://www.mql5.com/ru/code/22922