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

[amibroker] SellPrice Based on the BuyPrice



PureBytes Links

Trading Reference Links

Several times
there were questions
regarding Sell exits based on the BuyPrice.

Because Buy is 'True' on 'Buy' signals after entry
a 'SellPrice' based on: ValueWhen(Buy, BuyPrice);
may not be based on the actual entry price.

I read,
that for a correct entry price
using a loop is necessary.

For those, like me, who use AFL and cannot code loops
so we may use these exits,
would someone be good enough to post
simple loops equivalent to the following:

A set for:

Atr1= ATR(14);
CrashXitLong= L< ValueWhen(Buy,   BuyPrice  )- 1* Atr1;
CrashXitShrt= H> ValueWhen(Short, ShortPrice)+ 1* Atr1;

A loop for:

BI= BarIndex();
DysInTrade= 10;
nBarXit= ( BI>= ValueWhen(Buy, BarIndex )+ DysInTrade ) AND Cond1;

Thank you kindly,
DirectAim


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

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/