DRAW_COLOR_HISTOGRAM - MetaTrader 5 Script - MT4/MT5 Resources

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).

Attachment download
📎 draw_color_histogram.mq5 (6.22 KB)
Source: MQL5 #343
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •