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

Re: [amibroker] ATR Trailing stop - only move higher possible ?



PureBytes Links

Trading Reference Links

Hi Jim and Graham,

thank you, however i mean the build-in stop.
I can use the build-in stop as described in the amibroker manual, see below.
But it seems that the stop also goes down when the result of 3*ATR(14) changes.


/* single-line implementation of Chandelier exit */
ApplyStop(stopTypeTrailing, stopModePoint, 3*ATR(14), True, True );

Regards

Thomas
www.tradingbasis.com


jim bailey wrote:
Thomas,

You could adapt this:
http://finance.groups.yahoo.com/group/amibroker-ts/message/2076

Regards

--- Thomas Z <tzg@xxxxxxxxxxxxxxxx> wrote:


---------------------------------
    Hello,

i am trying the applystop function with the trailstop.

However i have noted that the stop goes down on a long
position whenthe ATR(10) changes.
Isn't it possible to let it only rise ? I really don't
like to move mystop 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);

RegardsThomaswww.tradingbasis.com


		
____________________________________________________ 
Do you Yahoo!? 
Messenger 7.0: Free worldwide PC to PC calls 
http://au.messenger.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




  


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