triangular moving average

 

Does anybody have the code for TMA?

The formula is...

SMA = (P1 + P2 + P3 + P4 + ... + Pn) / n
TMA = (SMA1 + SMA2 + SMA3 + SMA4 + ... SMAn) / n

Clearly, the first point of the TMA is 2*MA_Period from the start of data.

I would be grateful for any code suggestions.

------------------------------------------------------------------------------

The question has been answered at https://www.mql5.com/en/code/7512

What a wonderful forum this is, thank you