iCustom() Question
Hello everybody
I need some help on how can I use a the iCustom() function to detect the color of the circles that the indicator draw’s (Red or Green ?)
,I try to look to the Data Window to know the indicator buffers , but there is nothing .
(I have the compiled file)
You can't use iCustom for this. These indication on the chart are objects, you have to find them and get their values with Objects function, see documentation.
Thanks Mr.Alain
How can we use Objects function if we want to use the indicator objects values in an EA ?
Or how I can call this indicator to use the objects function ?
Thanks Mr.Alain
How can we use Objects function if we want to use the indicator objects values in an EA ?
Or how I can call this indicator to use the objects function ?
- www.mql5.com
Loop through all the objects of the chart, check each object : https://www.mql5.com/en/docs/objects
static int Trend=1245; string clr; clr=ColorToString( ObjectGet( "D1B", OBJPROP_COLOR ),True); // "D1B" is the name of the object if (clr=="clrLimeGreen") { Trend=0; // Up Print("The color is ", clr ," and the Trend = ",Trend); } if(clr=="clrRed") { Trend=1; // Down Print("The color is ", clr ," and the Trend = ",Trend); }I try this code but it run's just one time when I Run the strategy tester
Hello everybody
I need some help on how can I use a the iCustom() function to detect the color of the circles that the indicator draw’s (Red or Green ?)
,I try to look to the Data Window to know the indicator buffers , but there is nothing .
(I have the compiled file)