RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Fill on the same bar close not working for... Expand / Collapse
Message
Posted 3/12/2010 00:23:53 Post #11145
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
Hello,

I want to simulate fills on the close of the same bars on which a position is sent for execution in the RE paper trader. I looked at all the other threads that treated this issue, implemented the code and suggestions but still dont seem to be able to get where I want to. I use daily bar data and daily system frequency. I simply like to get the price on the fill of the same bar when the order was executed due to a signal that was triggered on the very same bar. With below code I get filled on the open of that bar which is very strange and would definitely mean I am forward looking. I just want to get filled on the close of the same bar as the signal and execution for both, new open and closing orders.

Could you please have a look and suggest what I may be doing wrong?

thanks a lot
Brian

SYSTEM CLASS:

public override void Startup()
{
SystemData.CreateTicksFromBars = true;
SystemData.EnableTradeOnClose = true;
SystemData.BarClosing += BarClosing;
}

public void BarClosing(object sender, NewBarEventArgs args)
{
foreach (Symbol symbol in args.Symbols)
{
SymbolScripts[symbol].BarClosing();
}
}

SYMBOL CLASS:

public void BarClosing()
{
//Trade Entries
TradeExecution.TradeEntry(SystemData, settings, Symbol, Bars, positionList);
}

Trade Entry is a function within I send a market order.
Posted 3/12/2010 09:04:43 Post #11150
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
Per your previous thread, we're looking into this. Stand by.
Posted 3/23/2010 11:03:52 Post #11240
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
any update on this?
Posted 3/24/2010 00:37:31 Post #11247
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
There was a bug in the BarClosing logic which caused the whole bar to be reprocessed, instead of just the closing price. This would mean market orders would be filled at the open price instead of the close price. This will be fixed in the next build.

Thanks for bringing this to our attention,
Daniel
« 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 10:25pm

2005-2007 © RightEdge Systems