Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

DRAW_COLOR_HISTOGRAM - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

DRAW_COLOR_HISTOGRAM - indicator for MetaTrader 5

This indicator is a demonstration of the DRAW_COLOR_HISTOGRAM painting style.

It plots the sin(x) function as a color histogram in a separate window. Two indicator buffers are used: the first contains the value of the sin(x) function, the second indicator buffer specifies the color index.

Histogram color, width, and line style change randomly after N=5 ticks. plot1 The initial properties of the graph plot are defined using the #property preprocessor directive, further these properties are randomly changed (see OnCalculate() function).

See drawing styles in MQL5.

DRAW_COLOR_HISTOGRAM - indicator for MetaTrader 5


Attachment download

📎 draw_color_histogram.mq5 (6.22 KB)

Source: MQL5 #343

Verification code Refresh