Profile Picture

Live system does not initiate orders

Posted By Ossie68 9 Years Ago
Message
Posted Wednesday May 21 2008
I try to run my trading system in the live environment but it does not place orders upon trigger signals. I have my IB TWS simulation (paper trading) account running in the background to execute the orders but nothing happens. However, the IB live data feeds works fine and so does the trading system when running the simulation. Also, the folder that contains the symbol I want to trade has IB set as the Broker Service to be used. What am I missing here?

The symbol I want to trade is an 'EOE' future (Currency: EUR / Exchange: FTA / Tick size: 0.05 / Contract size: 200 / Exchange opening hours from 9 AM - 17:35 PM CET or 3 - 11:35 AM EST). I understand from http://www.rightedgesystems.com/forums/FindPost1819.aspx that you have to make sure that you have the tick size and contract size set correctly in the symbol information, otherwise IB may reject the order because it does not conform to the minimum price variation.

Posted Wednesday May 21 2008
Some questions - Do the orders ever show up in the pending orders tab of the live system pane?  Do you see anything at all coming in on the TWS side?

Also, if possible please put this snippet of code into your symbol script class and see what sort of output you get in the output pane:

     //    This method is called when an order is cancelled or rejected

     if (!order.CancelPending)

     {

           OutputWarning("Order cancelled unexpectedly: " + information);

     }

 

 

Posted Thursday May 22 2008
I have added your snippet of code and now saw a pending order in the Live System pane for a split second before I got this output message:
SeverityMessageSymbolModuleTime
1Order cancelled unexpectedly: Error reading request:-'rb' : cause - Unable format field - EOE 062008Symbol Script22-5-2008 10:46
dh
Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)
Posted Thursday May 22 2008
I have got the same error on 5 minute intraday, stock FFIV (or any other stock), IB paper trade account, live data feed ok:

1 OrderCancelled: Long Market Rejected OpenPosition Buy 1500 Error reading request:-'rb' : cause - Unable format field -  FFIV Symbol Script 22.05.2008 15:49

 

and here is the TWS log file, maybe it helps:

 

OF 15:49:12:842 JTS-EServerSocket-135: [0:0:40:1:0:0:0:SYS] Starting new conversation with client on localhost/127.0.0.1
OF 15:49:12:852 JTS-EServerSocket-135: [0:33:40:1:0:0:0:SYS] TWS socket server version is 40
OF 15:49:12:852 JTS-EServerSocket-135: [0:33:40:1:0:0:0:SYS] Client version is 33
OF 15:49:12:860 JTS-EServerSocket-135: [1001:33:40:1:0:0:0:SYS] Client ID is 1001
OF 15:49:12:950 JTS-EServerSocket-135: Error: can't find sec type STOCK
OF 15:49:12:952 JTS-EServerSocket-135: Error: can't parse long string - java.lang.NumberFormatException: For input string: "00010001-12"
OF 15:49:12:952 JTS-EServerSocket-135: Error: can't find sec type STOCK
OF 15:49:12:953 JTS-EServerSocket-135: Error: can't parse long string - java.lang.NumberFormatException: For input string: "00010001-12"
OF 15:50:06:533 JTS-EServerSocket-135: [1001:33:40:1:0:0:0:ERR] -'rb' : cause - Unable format field -
OF 15:50:06:534 JTS-EServerSocket-135: Anticipated error
OF jextend.c: Unable format field -
 at jextend.x.b(x.java:222)
 at jextend.nd.I(nd.java:641)
 at jextend.nd.run(nd.java:589)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NumberFormatException: For input string: "0,00000000"
 at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
 at java.lang.Double.parseDouble(Unknown Source)
 at jextend.x.l(x.java:543)
 at jextend.rb.a(rb.java:309)
 at jextend.x.b(x.java:213)
 ... 3 more


OF 15:50:06:547 JTS-EServerSocket-135: [1001:33:40:1:0:0:0:ERR] Client socket broken -
OF java.lang.NumberFormatException: For input string: "0,00000000"
 at java.lang.NumberFormatException.forInputString(Unknown Source)
 at java.lang.Integer.parseInt(Unknown Source)
 at java.lang.Integer.parseInt(Unknown Source)
 at jextend.x.s(x.java:583)
 at jextend.nd.I(nd.java:627)
 at jextend.nd.run(nd.java:589)
 at java.lang.Thread.run(Unknown Source)


 


Edited: Thursday May 22 2008 by dh
Posted Thursday May 22 2008
We appreciate the continued information, we're investigating
dh
Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)
Posted Thursday May 22 2008
Let me just add the following:

In my opinion, live trading is one of the most important features of RE.

If the broker adapter does not work, I can do nothing but sit and wait.

I know that the broker adapter is a pretty difficult thing. So if you need any help with testing, debugging or whatever, please let me know.

Hoping you can fix this thing soon, thanks, DH


Edited: Thursday May 22 2008 by dh
Posted Friday May 23 2008
Using FFIV, as that is a simpler test case.

Testing here and it is working.  I'm beginning to think that this is a locale issue in the plugin or in TWS with regards how they parse numbers.

Could you guys search the TWS log file and look for "Property locale_to_use=" and let me see the entire line.

dh
Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)Supreme Being (4,221 reputation)
Posted Friday May 23 2008
here you go:

OF 15:17:25:703 JTS-CCPDispatcher-12: Property locale_to_use=en

I am running Windows-XP, language: german, IB-TWS language: english

Posted Friday May 23 2008
Ok, this is what I expected in this case (TWS in english).

I think we have a case where a number passed to TWS is not being forced to use points as decimal placeholders and is instead using the local of the machine and using a comma.  Continuing to investigate.

Posted Friday May 23 2008
Attached is an updated DLL with this problem fixed.  Unzip it to the Plugins folder in your RightEdge installation directory.

Thanks,
Daniel


Attachments
Krs.Ats.IBNet.zip (433 views, 31.00 KB)


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems