I am creating a custom indicator where the information output only really makes sense when displayed as a heat map (example attached below). On each iteration, an array of 50 values is generated and I'd like to color the indicator window from range 1-50 on the y-axis according to each corresponding value in the array.
The only way I believe this can be done in MQL5 is to create a separate buffer for each of the 50 values. However, that is far to inelegant for my liking. Does anyone else have any insight into how I can accomplish this in the most efficient manner?
So its like a "matrix" type of display and the display has 50 rows per bar always?
Yes exactly, Its a matrix that always displays 50 rows per bar and each value in the matrix ranges between 0 and 1.
I am looking to color the display at each row depending on the value.
If value is more than .5 color row red or green (color depending on another conditional)
If value is less than .5 color row black
Alright then , the best option is to deploy a background canvas (or memory resource) that you draw to .Each time the chart changes you redraw it ,getting its size and splitting it to 50rows.It would be best visually if the heat map was on a separate window since its not relative to the price chart
It is fun yes :) . Enjoy
Please enable the necessary setting in your browser, otherwise you will not be able to log in.