Profile Picture

Filling orders outside of RTH

Posted By Zora 8 Years Ago
Message
Posted Tuesday May 05 2009
I suspect I know the answer to my question ("no"), but nonetheless: is there a way to set the "Allow orders to be filled outside of RTH" to false when my system places pre-market orders with TWS? The idea is to place orders before market open, but have them execute during RTH (regular trading hours).

Thanks!
Posted Tuesday May 05 2009
Well, the answer is 'no' as to whether or not the plugin does this. However, what's stopping you from simply building a collection of orders pre-market and then sending them off when the bell rings?

Zora (5/5/2009)
I suspect I know the answer to my question ("no"), but nonetheless: is there a way to set the "Allow orders to be filled outside of RTH" to false when my system places pre-market orders with TWS? The idea is to place orders before market open, but have them execute during RTH (regular trading hours).

Thanks!
Posted Tuesday May 05 2009
The TWS plugin does have an option to only allow orders to be filled during RTH.  Have you tried enabling that setting and submitting your orders before the market opens?  I'm not sure whether TWS will reject the orders or wait until the market opens to fill them.

Daniel

Posted Tuesday May 05 2009
The thing is, I want orders to be placed before market open to maximize the chances of buying close to the opening price. In my experiments, placing hundreds of buy orders at 9:30 can take seconds or tens of seconds, which is precious time lost, especially if the prices are fluctuating a lot.

billb (5/5/2009)
Well, the answer is 'no' as to whether or not the plugin does this. However, what's stopping you from simply building a collection of orders pre-market and then sending them off when the bell rings?

Zora (5/5/2009)
I suspect I know the answer to my question ("no"), but nonetheless: is there a way to set the "Allow orders to be filled outside of RTH" to false when my system places pre-market orders with TWS? The idea is to place orders before market open, but have them execute during RTH (regular trading hours).

Thanks!
Posted Tuesday May 05 2009
The only setting I was able to find in TWS is under Configuration->Presets->Stocks, there are two checkboxes, one "Allow orders to be activated, triggered, or filled outside of regular trading hours", the other "Allow orders to be routed and executed during pre-open session." Both of these were unchecked. Anywhere else I should look? When you place limit buy orders through the API, do you use the rth only property (I read about it on another forum...)? What is its default value?

Thanks!

dplaisted (5/5/2009)
The TWS plugin does have an option to only allow orders to be filled during RTH. Have you tried enabling that setting and submitting your orders before the market opens? I'm not sure whether TWS will reject the orders or wait until the market opens to fill them.

Daniel
Posted Tuesday May 05 2009
Daniel's referring to the setting in the TWS plugin in RightEdge, not TWS itself.

Zora (5/5/2009)
The only setting I was able to find in TWS is under Configuration->Presets->Stocks, there are two checkboxes, one "Allow orders to be activated, triggered, or filled outside of regular trading hours", the other "Allow orders to be routed and executed during pre-open session." Both of these were unchecked. Anywhere else I should look? When you place limit buy orders through the API, do you use the rth only property (I read about it on another forum...)? What is its default value?

Thanks!

dplaisted (5/5/2009)
The TWS plugin does have an option to only allow orders to be filled during RTH. Have you tried enabling that setting and submitting your orders before the market opens? I'm not sure whether TWS will reject the orders or wait until the market opens to fill them.

Daniel
Posted Tuesday May 05 2009
Ah, I see. Looking at the TWS plugin and "Other Settings..." I see a "Retrieve RTH data only" checkbox and "Ignore last historical bar" checkbox, neither of which seem appropriate (and both are unchecked.) This is build 384 btw.
Posted Tuesday May 05 2009
I remember discussing the issue with Daniel and, after looking at the Krs code, figuring out that there are two different flags to achieve this and that one wasn't working but Daniel said that the other one did.
I believe he mentioned that this is fixed in b381, however until that was resolved I had already implemented the "building a pool of orders" and I'm submitting them with a timer at market open. I actually have on my plate the task to stop using this workaround and revert my code back to submitting the orders at any time while making sure they will not be filled outside of RTH, but I have not found the time to do that. It's interesting to hear that it doesn't work for you.

BTW, Note that Market orders are not supposed to be execute outside of RTH, only limit, so if you submit Market orders you should be fine.
Posted Tuesday May 05 2009
See
http://www.rightedgesystems.com/forums/Topic6917-7-1.aspx

Now I'm confused and can't remember where did I pick up info about b381
Posted Tuesday May 05 2009
The RTH only checkbox is what you want.  Under RE2008 Edition 2, the label has been changed to "Restrict orders and downloaded bars to regular trading hours (RTH)", but it looks like we didn't change the label in Edition 1.  It should still set the flag that tells TWS only to fill orders during regular trading hours in Edition 1, though.

Daniel



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems