RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        


12»»

Filling orders outside of RTH Expand / Collapse
Message
Posted 5/5/2009 08:22:16 Post #8324
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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 5/5/2009 08:52:04 Post #8326
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
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 5/5/2009 10:22:32 Post #8330
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
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 5/5/2009 15:04:36 Post #8343
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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 5/5/2009 15:46:09 Post #8345
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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 5/5/2009 15:54:09 Post #8347
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
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 5/5/2009 16:06:10 Post #8349
 

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru
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 5/5/2009 19:39:26 Post #8357
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
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 5/5/2009 19:47:14 Post #8358
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
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 5/5/2009 23:38:56 Post #8361
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
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

« Prev Topic | Next Topic »

12»»

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 1:11am

2005-2007 © RightEdge Systems