The CTrixOnArray class is intended for calculation of Triple Exponential Average (TRIX) on an indicator buffer.
The Init() method with the following parameters is called in the OnInit() function of the indicator:
The Solve() method with the following parameters is called in the OnCalculate() function:
Test_TrixOnArray.mq5 is an indicator demonstrating how to use the CTrixOnArray class. The IncTrixOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created). The CMAOnArray class for the IncMAOnArray file is required for this class for work.
Triple Exponential Average (TRIX) was developed by Jack Hutson as an oscillator of the overbought/oversold market conditions. It can also be used as the Momentum indicator. Triple smoothing is used for removing the cyclic components in price movements with the period less than that of TRIX.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/655
The CPriceChannelOnArray class is intended for calculation of the price channel on indicator buffers.IncEnvelopesOnArray
The CEnvelopesOnArray class is intended for calculation of Envelopes on an indicator buffer.