Download MetaTrader 5

Indicators: DRAW_COLOR_CANDLES

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
182445
MetaQuotes Software Corp. 2011.05.02 19:14 

DRAW_COLOR_CANDLES:

The DRAW_COLOR_CANDLES style (as DRAW_CANDLES) draws candlesticks based on values of four indicator buffers, containing Open, High, Low and Close prices. In additions it allows you to specify color for each candlestick from a given set.

The color of candlesticks changes randomly every N ticks. The N parameter of indicator is made as external so that you can adjust it manually (the Inputs tab of indicator properties dialog box). Note, that initially there are 8 colors set for the plot1 graphical plotting using the #property compiler directive. Then, in the OnCalculate() function the color is chosen at random from predefined list.

See also The Drawing Styles in MQL5 article.

DRAW_COLOR_CANDLES

Author: MetaQuotes


To add comments, please log in or register