Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2014.04.25 14:52

CDonchian class - library for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 46
cdonchian.mqh (3.08 KB)view
donchian.mq5 (2.78 KB)view

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

Donchian channel

Translated from Russian by MetaQuotes Software Corp.
Original code:

FisherCGOscillator_Signal FisherCGOscillator_Signal

The FisherCGOscillator_Signal indicator shows information on the current trend using the values of the FisherCGOscillator indicator with a fixed timeframe.

TrendRSI_v1 TrendRSI_v1

The RSI oscillator with two signal lines.


A set of support and resistance levels built on the last tops of GannZIGZAG_HTF with an option of fixing the timeframe, on which the zigzag is calculated.

XD-RangeSwitch_HTF XD-RangeSwitch_HTF

The XD-RangeSwitch indicator with the timeframe selection option available in input parameters.