Watch how to download trading robots for free
Find us on Telegram!
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:
6110
Rating:
(16)
Published:
2011.04.08 10:48
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 sections between the High and Low prices of the bars.

The color, width and style of the sections changes randomly each N ticks. Note that initial properties of the plot1 graphic plot (DRAW_SECTION) are defined using the #property preprocessor directive, further these properties changed randomly (OnCalculate() function). The N variable is defined as input parameter, it can be changed manually using the "Properties" window.

See also: The Drawing Styles in MQL5.

DRAW_SECTION

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

DRAW_LINE DRAW_LINE

The DRAW_LINE style is used for plotting the values of the indicator's buffer as a line.

DRAW_NONE DRAW_NONE

The DRAW_NONE drawing style is used in cases, when you need to calculate and show the values of the indicator in "Data Window", but the plotting isn't needed.

DRAW_HISTOGRAM DRAW_HISTOGRAM

The DRAW_HISTOGRAM drawing style is used for plotting the values of the indicator's buffer as a histogram.

DRAW_HISTOGRAM2 DRAW_HISTOGRAM2

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