RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Backtesting order execution Expand / Collapse
Message
Posted 1/30/2010 20:19:10 Post #10646
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Hi,

I noticed my market order is executed on the next day close for every market order which my system generated.

So for example, if the current close is 1 and the next day close is 2. If I generate long signal when the current close is 1, my long entry order will be executed on 2 (the next day close). Here's the code that I'm using:


position = OpenPosition(PositionType.Long, OrderType.Market, this.Close.Current, getPositionSize(stop_threshold));


I'm using RE2 Beta 14. Is this the right behaviour or somekind of bug?

P.S:If my entry order is executed on next day open, that still makes sense, but next day close is quite weird to me.
Posted 1/30/2010 21:07:15 Post #10648
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
Market orders submitted in the NewBar() method should be filled on the open of the next bar. If this isn't the case, can you provide more information about what is happening?

Thanks,
Daniel
Posted 1/31/2010 03:07:51 Post #10655
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Hi,

Thanks for the quick response. I've re-checked my trade list, and apparently you are right. My market order does executed at opening the next day. Sorry for the trouble.


Thanks,
Felix


P.S: The reason why i thought it closed on the next day close price is because 'that next day' is a doji day.
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:01pm

2005-2007 © RightEdge Systems