Hello,
i am trying the applystop function with the trailstop.
However i have noted that the stop goes down on a long position when
the ATR(10) changes.
Isn't it possible to let it only rise ? I really don't like to move my
stop down.
fast = EMA(C,3); slow = EMA(C,10);
Buy=Cross(fast,slow); Sell=Cross(slow,fast);
stop_amount = 2*ATR(10);
ApplyStop(stopTypeTrailing,stopModePoint,stop_amount,exitatstop=1,volatile=True,ReEntryDelay=0);
Equity(1,0);
inLong = Ref(Flip(Buy,Sell),-1);
Plot(C,"C",1,128);
Plot(IIf(inlong,HHV(H,BarsSince(inlong))-2*ATR(10),-1e10),"",6,1);
PlotShapes(shapeSquare*(Sell==4),colorRed,0,SellPrice,0);
Regards
Thomas
www.tradingbasis.com
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
YAHOO! GROUPS LINKS
|