Help Detecting Changes in Custom Indicators

 

Hello


Im trying to use the 'Slope Direction Line' indicator in an EA and Im not sure how to tell when the color of the line has changed.


Im using the following code to access the indicator - 


double SDL=iCustom(Symbol(),0,"Slope Direction Line",80,3,0);



but im not sure of the logic required to tell if it has changed color, something along the lines of -   


if  ( SDL = green) {buy=true};


any help would be greatly appeciated


Tanks

Files:
Reason: