Hi,
just starting to play around with trading off the chart using my IB account.
I have noticed that when I submit an order, it always shows up in IB pending orders with a warning that it can be filled outside of RTH. (and I'm not able to modify that parameter in IB for that order)
Can you tell me where the setting is to ensure that the trade is only filled during RTH ?
The symbol is set to "US Stocks regular trading hours" in the quotemanager. I cannot find any other reference for RTH. Is it a setting in IB ?
regards
Ivan
orders submitted via IB API not RTH only
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: orders submitted via IB API not RTH only
You need to set the order's expiry in the Trade Panel or the Trade Bar - depending on where you are trading from. Possible choices are DAY, GTC, GTD, or IOC.
DAY - Expire at the end of the day (this is the one you need, assuming RTH means Real-Time Hours)
GTC - Good Til Cancel
GTD - Good Til Date
IOC - Instant or Cancel
DAY - Expire at the end of the day (this is the one you need, assuming RTH means Real-Time Hours)
GTC - Good Til Cancel
GTD - Good Til Date
IOC - Instant or Cancel
Re: orders submitted via IB API not RTH only
HI Stan,
RTH = regular trading hours
yes I have my orders set to "day" in the panel on righ hand side, so that's not the problem.
But I've subsequently found that if I issue a "market order" in MC then the trade in IB will be submitted as day / RTH
However, if I submit a limit order in MC, then IB shows as day / can be filled outside RTH.
There seems to be some inconsistancy there , both orders should only be filled inside RTH.
Having said that, there should also be an option somewhere in MC to specify whether the order is in fact allowed to be filled outside of RTH, but it seems to be "hardcoded" to the order type (market/limit etc) which I don't understand why
regards
Ivan
RTH = regular trading hours
yes I have my orders set to "day" in the panel on righ hand side, so that's not the problem.
But I've subsequently found that if I issue a "market order" in MC then the trade in IB will be submitted as day / RTH
However, if I submit a limit order in MC, then IB shows as day / can be filled outside RTH.
There seems to be some inconsistancy there , both orders should only be filled inside RTH.
Having said that, there should also be an option somewhere in MC to specify whether the order is in fact allowed to be filled outside of RTH, but it seems to be "hardcoded" to the order type (market/limit etc) which I don't understand why
regards
Ivan
Re: orders submitted via IB API not RTH only
You can change the order type (which limit you want) at TWS. It takes your value as default.
In your case right click to the triangle (Limit with triangle) and choose the value you want. It should use your settings for the next limit order.
The triangle is the warning that tells you that your limit can be filled outside RTH.
In your case right click to the triangle (Limit with triangle) and choose the value you want. It should use your settings for the next limit order.
The triangle is the warning that tells you that your limit can be filled outside RTH.
Re: orders submitted via IB API not RTH only
Hi Siscop,
I tried right clicking the triangle as you say, I can see the box has the tick in it to allow for outside of RTH, but it's greyed out, I cannot untick, so it will not let me modify this attribute.
I have searched everywhere in TWS, orders, presets, stocks etc and I can't find any reference on how to change this.
Pretty frustrating ! (especially since I had an order get filled yesterday at a bad price because it was accepted outside market hours....)
regards
Ivan
I tried right clicking the triangle as you say, I can see the box has the tick in it to allow for outside of RTH, but it's greyed out, I cannot untick, so it will not let me modify this attribute.
I have searched everywhere in TWS, orders, presets, stocks etc and I can't find any reference on how to change this.
Pretty frustrating ! (especially since I had an order get filled yesterday at a bad price because it was accepted outside market hours....)
regards
Ivan
Re: orders submitted via IB API not RTH only
Besides fixing RTH, I suggest you use time conditon in your code so that the orders are not sent at undesired time. Something on following line.......
Condition1=if time > MyStartTime and time < MyEndTime;
if Condition1 then .......
Condition1=if time > MyStartTime and time < MyEndTime;
if Condition1 then .......
Re: orders submitted via IB API not RTH only
Yes I can confirm that. It is greyed out.... It works for the exitlimits/exitstops but does not work with the entrylimits.I tried right clicking the triangle as you say, I can see the box has the tick in it to allow for outside of RTH, but it's greyed out, I cannot untick, so it will not let me modify this attribute.
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: orders submitted via IB API not RTH only
This sounds like a question that should be forwarded to IB's support... we are not experts on what's going on inside the TWS.