Profile Picture

Running daily bar systems LIVE on 24hr markets = Incorrect close price

Posted By smersh 3 Years Ago

Running daily bar systems LIVE on 24hr markets = Incorrect close price...

Message
Posted Thursday September 11 2014
When running daily bar systems LIVE on 24hr markets, the close of the bar is at midnight and it is then when the close price of the bar is recorded. However if you retrieve historical data, the close prices provided by the data source (e.g. IB for me) are the correct official exchange close price.

This means I have to restart RE at some point every day (after the official close but before the next open which is about 45min window on globex) and retrieve data and restart the script before the next open.

Is there a better way or am I missing something?
Posted Sunday September 14 2014
If you are getting after market hour data from the exchange, those will be by default included in the bars that RightEdge generates, affecting the close price.  You can filter out this data either in the live data options (though this is global so you can't do it per symbol), or by using a FilteredDailyFrequency with a StartTime and EndTime set to the exchange hours.

That will get you much closer to the close price if your problem is the after market data, but it won't necessarily be the exact official close price.  If you want that price to be what your live system sees without restarting, I think you will need to put some special logic in the IB plugin.  When streaming live data, the plugin would need to ask IB for the most recent historical bar after the market has closed and the close price is available as historical data.  It would then need to send this close price as a standard live tick.  It would also probably need to filter out any other after market data so that the "special" close tick is the only thing that RightEdge gets after hours.

Thanks,
Daniel
Posted Sunday September 14 2014
Daniel, Thanks for putting your time into this reply. I'll think about which way I'll proceed.






Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems