Discover expert developed MetaTrader tools that can complement professional solutions.
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:
Recover from drawdowns intelligently with the Auto Recovery Expert Advisor for MT4/MT5. Perfect for hedging strategies. Learn more.
- 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

Build better strategies with RobotFX professional tools – check them out.
2271