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

Barebone Gradient Candles - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Barebone Gradient Candles - indicator for MetaTrader 5

Barebone Gradient Candles - indicator for MetaTrader 5

Colorful candlesticks illustrate gradient. It's a bit difficult to find a good working example of DRAW_COLOR_CANDLES that you can understand, most of the comments are useless, and the documentation doesn't even specify a drawing limit (PLOT_COLOR_INDEXES length is limited to 64, [0; 63]) or the order in which the functions should be called.

I'm also having trouble finding a working algorithm for moving an X color to a Y color (I believe this is called a gradient?); this code contains a math function that returns the gradient from X to Y, and I'd be interested to know if anyone has a better way to do this.

Please feel free to suggest patches in the comments, this code is a work in progress and free to everyone - you can also remove the permission attribute if you wish, but the // author: comment list should be maintained.

v1.01 - fix order, was reversed (missing 1.0 - percentage calculation)

Barebone Gradient Candles - indicator for MetaTrader 5


Attachment download

📎 barebone_gradient_candles.mq5 (8.24 KB)

Source: MQL5 #35362

Verification code Refresh