Diana
22nd October 2003, 07:11 AM
Hi,
I'd like to have a trailing stop triggered when the (long) Close price opens below or equal to the highest price since entry minus 2*ATR(10). Will this code work?
LongExitTrigger := ExtFml( "TradeSim.TrailingStop",trigger ,long ,2*ATR(10) ,H ,L ) ;
LongExitPrice := Ref(ExtFml( "TradeSim.TrailingStop",band ,long ,2*ATR(10) ,H ,L ),-1) ;
LongExitPrice := If(O<=LongExitPrice,O,LongExitPrice);
LongExitPrice := If(LongExitPrice<L,L,LongExitPrice);
Methinks maybe not? :? How do I reference the highest price since entry?
Thanks very much,
Diana :)
I'd like to have a trailing stop triggered when the (long) Close price opens below or equal to the highest price since entry minus 2*ATR(10). Will this code work?
LongExitTrigger := ExtFml( "TradeSim.TrailingStop",trigger ,long ,2*ATR(10) ,H ,L ) ;
LongExitPrice := Ref(ExtFml( "TradeSim.TrailingStop",band ,long ,2*ATR(10) ,H ,L ),-1) ;
LongExitPrice := If(O<=LongExitPrice,O,LongExitPrice);
LongExitPrice := If(LongExitPrice<L,L,LongExitPrice);
Methinks maybe not? :? How do I reference the highest price since entry?
Thanks very much,
Diana :)