Color buffers in multi-symbol multi-period indicators
by
, 07-05-2024 at 04:55 PM (163 Views)
more...We continue the development of multi-symbol, multi-period indicators which we started in the previous article.
A single-color indicator buffer is a regular double array, which is filled with data when calculating the indicator. We can obtain data from this array and display it on a chart using the CopyBuffer() function provided that the receiving array will be a double array set as an indicator's plotting buffer (SetIndexBuffer()). When copying data from the buffer of the calculated part of the indicator to the buffer of its plotting part, the data is displayed on the chart in one color, which is set for the buffer array of the plotting part. As for multi-colored buffers, the situation is a little different. In addition to the data array, the color buffer also has an array of color indexes.