orders submitted via IB API not RTH only

Questions about MultiCharts and user contributed studies.
ivanf
Posts: 8
Joined: 26 Oct 2010
Has thanked: 1 time

orders submitted via IB API not RTH only

Postby ivanf » 25 May 2011

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

User avatar
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

Postby Stan Bokov » 25 May 2011

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

ivanf
Posts: 8
Joined: 26 Oct 2010
Has thanked: 1 time

Re: orders submitted via IB API not RTH only

Postby ivanf » 25 May 2011

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

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: orders submitted via IB API not RTH only

Postby siscop » 25 May 2011

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.

ivanf
Posts: 8
Joined: 26 Oct 2010
Has thanked: 1 time

Re: orders submitted via IB API not RTH only

Postby ivanf » 25 May 2011

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

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Re: orders submitted via IB API not RTH only

Postby SUPER » 26 May 2011

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 .......

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: orders submitted via IB API not RTH only

Postby siscop » 27 May 2011

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.
Yes I can confirm that. It is greyed out.... It works for the exitlimits/exitstops but does not work with the entrylimits.

User avatar
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

Postby Stan Bokov » 27 May 2011

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.


Return to “MultiCharts”