Hi
I try to use function IIF with EMA change color green when raise up and color red when go down but it not working.
Anyone pls help me
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
colorchange = IIf(Periods > -1, colorGreen, colorRed);
Plot( EMA( P, Periods ), _DEFAULT_NAME(), colorchange, ParamStyle("Style") );