hi, i am writing an EA where i want a position to be opened when three of the indicators i am using are the same colour.
please take a look at the template i hav attached
take a look at one of the two indicators named HMA_V2. what i want to know is how can i distinguish between when the indicator is red or blue? programattically speaking.
i know the colour does not have anything to do with the value of the dots on the chart, but i am not sure what determines it or how to explain it in an EA.
i am new to programming and not very good.
i have tried a number of things. here is one thing i tried:if(iCustom(NULL,0,"HMA_v2",1,0 )== Tomato)
Alert("color is tomato");
if(iCustom(NULL,0,"HMA_v2",1,0 )== LightBlue)
Alert("Color is lightblue");
but it did not work. i also tried putting the colours in quotes and it still didnt work.
please take a look at the template i hav attached
take a look at one of the two indicators named HMA_V2. what i want to know is how can i distinguish between when the indicator is red or blue? programattically speaking.
i know the colour does not have anything to do with the value of the dots on the chart, but i am not sure what determines it or how to explain it in an EA.
i am new to programming and not very good.
i have tried a number of things. here is one thing i tried:if(iCustom(NULL,0,"HMA_v2",1,0 )== Tomato)
Alert("color is tomato");
if(iCustom(NULL,0,"HMA_v2",1,0 )== LightBlue)
Alert("Color is lightblue");
but it did not work. i also tried putting the colours in quotes and it still didnt work.
Attached File(s)
template_name.tpl
2 KB
|
338 downloads