PureBytes Links
Trading Reference Links
|
Hi everyone,
My codes shown below.
Basically, I want a trade signal when the Buy conditions are met and
my buy price is the day after where it purchases at the buy limit
price or the opening price, depending on which is lower.
However, there are 3 conditions for the sell. I have
1) a stop loss
2) a profit sell
3) an n-bar stop which automatically sells after the 3rd day at the
days open at market price
my problem is that the n-bar stop NEVER sells at the days open on the
3rd day after the trade is executed. it ALWAYS sells at the days
high.
i've e-mailed amibroker support and basically what happened they
informed me according to my formula below, and they say that my
SellPrice is overriding the 'Backtester Settings' to Sell Price at
Open.
Now this seems quite bizzare to me because if thats the case, it
seems to me the way Amibroker is set-up, I can't set a profit limit
sell price and command amibroker to sell my nbarstop at the market's
opening price.
it seems to me amibroker should have some sort of functionality such
that when the applystop is being executed, the sellprice should be
void and it should either be traded on the 'backtester settings'
options or there should be an additional variable included into the
applystop function to allow you to choose how the nbar stop price
should be.
can anyone assist me with this problem?
Buy = Ref(Cond1 AND Cond2 AND Cond3 ,-1) AND L <= BuyLimitPrice;
BuyPrice = Min(O,BuyLimitPrice);
SellPrice = Max(O,SellLimitPrice);
Sell = IIf(H >= SellLimitPrice;
ApplyStop(stopTypeNBar,stopModeBars,2, 0, False, 2);
ApplyStop(stopTypeLoss,stopModePoint,StopLimitPrice,True,False,1);
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/
|