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

2015.07.01 15:01

Rainbow - indicator for MetaTrader 5

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

votes: 13
rainbow.mq5 (10.71 KB)view


Sixty Moving Averages with gradually changing period on a single chart.

Indicator input parameters:

input Smooth_Method XMA_Method=MODE_EMA; // Averaging method
input uint StartLength=2; // First depth of averaging
input uint StartStep=2;   // Starting step of averaging change
input uint EndStep=6;     // Final step of averaging change                                         
input int XPhase=15;      // Averaging parameter
                          // for JJMA it varies within the range -100 ... +100 and influences the quality of the transient process;
                          // for VIDIA it is a CMO period, for AMA it is a slow average period
input Applied_price_ IPC=PRICE_QUARTER_;// Price constant
input int Shift=0;      // Horizontal indicator shift in bars
input int PriceShift=0; // Vertical indicator shift in points

The indicator uses the classes of the SmoothAlgorithms.mqh library. Working with these classes was described in details in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".


Fig.1. The Rainbow indicator

Fig.1. The Rainbow indicator

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.