Page 1 of 2

Unable to connect

Posted: Wed Jan 04, 2023 12:49 pm
by abacaba
After installing the new TWS 1.20.1.6 version required by them for CBOE data, I am unable to connect using broker interface. Price data comes through via API but chart trading is not available. I've reviewed all settings -- all check out. I'll open a ticket. Anyone else having this problem?
tws connection lost.PNG
tws connection lost.PNG (15.39 KiB) Viewed 11977 times

Re: Unable to connect

Posted: Wed Jan 04, 2023 5:46 pm
by sbank
I see the same problem with any version greater than 9.x of TWS. (I use DTN IQfeed for my data so I haven't been forced to upgrade yet...)

Re: Unable to connect

Posted: Fri Aug 18, 2023 6:06 am
by lexa007
Did you manage to solve the issue? As i am having the same problem with IB

Re: Unable to connect

Posted: Mon Aug 21, 2023 12:39 pm
by sbank
I was able to solve this on my own.

I ended up going through the IB API section line by line a toggling everything. (Ofcourse the setting that fixed it was at the bottom.)

Here is a screenshot of TWS 10.23. Everything works *except* I cannot use the "quick" button in Wave59. It is not a huge concern for me since I am not a scalper, but I did find that functionality useful at times.
2023-07-31_12-28-31.png
2023-07-31_12-28-31.png (250.76 KiB) Viewed 11486 times

Re: Unable to connect

Posted: Tue Aug 22, 2023 8:15 am
by lexa007
sbank wrote:
Mon Aug 21, 2023 12:39 pm
I was able to solve this on my own.

I ended up going through the IB API section line by line a toggling everything. (Ofcourse the setting that fixed it was at the bottom.)

Here is a screenshot of TWS 10.23. Everything works *except* I cannot use the "quick" button in Wave59. It is not a huge concern for me since I am not a scalper, but I did find that functionality useful at times.

2023-07-31_12-28-31.png

You are a star mate! Thank you very much!!

Re: Unable to connect

Posted: Thu Aug 24, 2023 6:09 am
by lexa007
sbank wrote:
Mon Aug 21, 2023 12:39 pm
I was able to solve this on my own.

I ended up going through the IB API section line by line a toggling everything. (Ofcourse the setting that fixed it was at the bottom.)

Here is a screenshot of TWS 10.23. Everything works *except* I cannot use the "quick" button in Wave59. It is not a huge concern for me since I am not a scalper, but I did find that functionality useful at times.

2023-07-31_12-28-31.png
Yes there seems to be a transmit issue with market orders. IBPLACEORDER transmits limit orders but not market ones. The market order is placed in IB but never transmits but i think this is an IB issue. Just to update

Re: Unable to connect

Posted: Thu Aug 24, 2023 5:02 pm
by sbank
My QScripts are able to place Market orders (FWIW). ¯\_(ツ)_/¯

Re: Unable to connect

Posted: Thu Aug 24, 2023 5:37 pm
by lexa007
sbank wrote:
Thu Aug 24, 2023 5:02 pm
My QScripts are able to place Market orders (FWIW). ¯\_(ツ)_/¯
Mine not! It would be great for the small community that is left, if you could share an example code? You have been very helpful thus far!

Re: Unable to connect

Posted: Fri Aug 25, 2023 2:18 pm
by sbank
Ya know, you might be on to something about all market orders. I looked at all my code, and I place limit orders, wait, then convert to market if the order doesn't fill.

Here is my boilerplate code I use for everything (this is out of Earik's Mechanical Trading book):

Code: Select all

if (barnum == barsback) {                                                                                                                                               
    bs=0;                                                            
    signal=0;
    gomarket_hour=15;
    gomarket_minute=59;
    gomarket_second=40;
}
position = ib_marketposition();

# implement trading system
if ((signal>0) and (bs<=0)) {
   buy(1,close,"market","onebar");
   bs=1;
   
   # live orders
   if ((position <= 0) and (autotrade == true)){
        contracts = cts + abs(position);
        IB_CancelAll();
        ref=IB_PlaceOrder("buy",contracts,close,"limit","day","");
        ib_gomarketattime(ref,year,month,day,gomarket_hour,gomarket_minute,gomarket_second);
   }
}
This is for daily bars. Make sure you set the chart up with the option to "run scripts 1 minute before the close."

Re: Unable to connect

Posted: Thu Sep 14, 2023 8:05 am
by lexa007
Image

Market orders no longer works with W59....has to be MKT PRT, however that need Earik to update the software.