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

[amibroker] A Protective Stop



PureBytes Links

Trading Reference Links

I am new to AmiBroker and have been using Metastock. I was told that 
it is much powerful in coding stop.

I need to have a protective trailing stop (not sure if I use the 
right word or not!), that moves to protect profit as price move 
favorably. The logic follows similar to Richard's ATS, but I have 
checked with him who confirmed that it is not possible to code the 
stop that I want. 
 
Say for Long, with price is higher than the entry price (BPx) by 
100, change the stop to entry price (BPx) + 5 (to cover commission 
and etc), and than if price reaches to the level of entry price 
(BPx) + 2*ATR(10), change the trailing stop to H-3.5*ATR(10).  
Please see the following:- 
LE:=buy signal; 
BPx:= to be defined;
InitBStop:=to be defined; 

When PX hits BPx + 100 (# can be amended) ---> Stop changes to BPx + 
5 (to cover comissions etc);
When Px hits BPx + 2*ATR(10) ---- > Stop moves to H-3.5*ATR(10); 

This is similar to Ricard Dales¡¦s DLL which has added to move to 
next pyramid stop when next level of px hit e.g. BPx + 4*ATR(10)}
 
SE:=sell signal;
SPx=to be defined;
InitSStop:=to be defined;
When Px hits SPx -100 -----> Stop moves to SPX - 5 ;
when Px hits SPx - 2*ATR(10) ---- > Stop moves to L +3.5*ATR(10);

Can any expert help me coding this?

Sa


------------------------------------

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/