Profile Picture

Symbol Open Time/ Close Time

Posted By BigBerner 10 Years Ago
Message
Posted Wednesday February 28 2007
I am building a broker plugin for a broker that only supports limit and market orders through its API, so I am handling other order types myself in the plugin. To handle market on close or market on open orders I need to get the open and close times for a symbol. Any suggestions on how I could do this?
Posted Wednesday February 28 2007
Are you planning to use these order types in your system?  If not, I wouldn't worry about trying to support them.  You could just throw an exception if you get an order type you don't support, or convert it to a market order.

Daniel

Posted Wednesday February 28 2007
Well I might use the market on close sometimes so I would prefer to try and implement it. Does RE know how to handle market on close in a backtesting situation? It seems to me that it couldn't as I cannot see anywhere to input session times in the software, so how could it know what bar to close the trade out on?
Posted Wednesday February 28 2007
When backtesting, RightEdge fills a market on close order at the close price of the next bar.  If you are not using daily bars this may not be very useful.

If you want to implement this yourself I think you would need to specify when the market closes, and how far before the close the order should be submitted as a market order.  I would recommend putting this logic in your trading system, and not supporting the market on close order in your broker.  You could do it either way though.

Daniel

Posted Wednesday February 28 2007
OK so market on open/close don't work for intra day data (unless you mean open/close of next bar). I guess I will not support it in the plugin and place a parameter for the closing time in any system that I want to use this type of order. That way I can just change the parameter for different markets - I guess that works.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems