[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Please help in my formula



PureBytes Links

Trading Reference Links

Can anyone please help me?

I have the following formula:

Plot (C, "Close", colorBlue, styleThick, Null, Null, 0);
CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
PlotShapes( IIf( CPct0 >= 4, shapeHollowUpArrow, shapeNone ) , colorPaleGreen );
PlotShapes( IIf( CPct0 <= -4 , shapeHollowDownArrow, shapeNone ) , colorGold );

This gives me arrows after my condition of CPct0 >= 4 or CPct0 <= -4 is met.

What should I change so that I get TWO arrows - the first arrow one bar before my condition is met, and the second arrow 10 bars before my condition is met.

Thanks, and regards,

Vinay Gakkhar