Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
9279
Rating:
(22)
Published:
2011.04.11 15:30
Updated:
2016.11.22 07:32
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The indicator plots a channel based on two moving averages with different periods in the separate window.

The change of the channel color shows the change of the trend.

The DRAW_FILLING drawing style plots the filled area between the values of two indicator buffers. In fact, it plots two lines and fills the area between them with the specified color. The colors of the channel changed after N ticks. The N variable is defined as input parameter, it can be changed using the "Properties" window.

Note that initial properties of the plot1 graphic plot (DRAW_FILLING) are defined using the #property preprocessor directive, further these properties changed randomly (OnCalculate() function).

See also: The Drawing Styles in MQL5.

Image:

DRAW_FILLING



Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/336

DRAW_CANDLES DRAW_CANDLES

The DRAW_CANDLES drawing style plots the candles using the values of 4 indicator buffers with Open, High, Low and Close prices.

DRAW_HISTOGRAM2 DRAW_HISTOGRAM2

The DRAW_HISTOGRAM2 drawing style is used for plotting the values of two indicator's buffers as a histogram.

DRAW_BARS DRAW_BARS

The DRAW_BARS drawing style is used to plot the bars using the values of 4 indicator buffers with Open, High, Low and Close prices.

DRAW_ZIGZAG DRAW_ZIGZAG

The DRAW_ZIGZAG drawing style allow to draw sections using the values of two indicator buffers. It looks like DRAW_SECTION, but it allows to draw vertical sections inside one bar.