DRAW_COLOR_CANDLES - MetaTrader 5 Script - MT4/MT5 Resources

Indicator example to draw candlesticks of the specified instrument in a separate window.
The color of the candlestick changes randomly every N ticks. The N parameter of the indicator is set as an external parameter so that you can adjust it manually (Input tab of the indicator properties dialog box). Note that 8 colors are initially set for plot1 plotting, using the #property compiler directive. Then, in the OnCalculate() function the color is randomly selected from a predefined list.
See the article Drawing styles in MQL5 .

Attachment download
📎 draw_color_candles.mq5 (9.65 KB)
Source: MQL5 #349
DRAW_COLOR_CANDLES - MetaTrader 5 script usage and filtering suggestions
DRAW_COLOR_CANDLES - MetaTrader 5 script is a resource related to Forex indicators. Before downloading or referencing, it is recommended to confirm the platform version, transaction type, time period, whether DLL is required, whether source code is included, parameter description and historical update records.
Both automated trading tools and foreign exchange indicators should first undergo backtesting, simulated account observation, and small capital verification. Pay special attention to spreads, slippages, maximum drawdowns, position opening frequency, stop loss methods, trading periods and broker rules, and avoid direct real-time execution based only on titles or short-term profit descriptions.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •