Search code examples
mql4indicator

How i can get color of indicator on my ea in mql4


how I can get the color of the indicator on my ea in mql 4?

I used the objectfind function but the indicator does not appear in the list of objects.


Solution

  • You have not stated which indicator you are trying to read therefore I can only answer in general.

    Generally you will find that most indicators use Buffers to display information. You cannot directly read the information of a buffer from a chart, you can however use iCustom() or the indicators i function (iMACD() for example) to read a separate instance of the indicator that is on the chart from within an EA (or another indicator). You should be able to receive any necessary information (such as when color changes may occur) using this method.