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

[amibroker] Re: Exit Problem



PureBytes Links

Trading Reference Links

Do you also have Sell Price = Open and Sell Delay = 1 in the trades 
tab? Sounds like you should, since your exit logic requires the Close 
in order to execute. Thus, it cannot execute until the open of the 
next day at the earliest.

Personally, I find it less error prone to do this in code such that 
any changes to the settings have no impact on already tested code.

e.g.

BuyPrice = Open;
SellPrice = Open,
SetTradeDelays(1, 1, 1, 1);

Also, you may want to verify that the "Allow same bar exit" is 
checked and see if that makes a difference.

Just a couple of shots in the dark :(

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "bean_pi314" <gkjw@xxx> wrote:
>
> I have encountered a strange exit problem while using the portfolio 
> backtester and trading at the open the day after a signal.  The 
> strategy I am testing is a 2-5 day mean reversion system.  
> 
> Settings:
> In the trades tab, I set buy = Open, Delay = 1.
> Sell = C > MA(C, 5);
> 
> I have noticed that I occasionally have two positions in the same 
stock 
> (triggered by sequential buy signals) that exit on different days 
(the 
> exit signal should be valid for both positions).  This occurs when 
the 
> second position is entered the morning (i.e. at open) the day that 
the 
> exit signal occurs.  However, when I only have a single position in 
a 
> stock, entry (at open) and exit (at close) occur as anticipated, 
even 
> when holding period is only one bar.  Any thoughts or suggestions 
about 
> what might be wrong would be appreciated.
> 
> Many thanks,
> Greg
>



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

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/