Uses the idea of the classical Donchian channel.
The class is optimized by speed, i. e. instead of 2 for loops, 1 while loop is executed.
The class sample requires the following:
- Fill in the arrays: double in_masH[], double in_masL[];
- Set variable values: int in_period (number of bars in the period), int in_size (size of arrays);
- Perform the procedure ini() to initialize the arrays;
- Perform the procedure void main(), which forms 2 arrays (channels): double out_massH[],double out_massL[],
An example of class use is available in the indicator Donchian.mq5
