Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 5 Libraries | CDonchian class | Free Download

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

Donchian channel

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

2271

Best MetaTrader Indicators + Profitable Expert Advisors