Price problem using Tradestation & IBPlugin

IBPlugin is further development of TWSLink.It is focused for the useage with MetaTrader. But as it is a DLL, you can use it everywhere on Windows which supports DLL, e.g. in Trade Station or C++ applications or make wrapper for Perl, Python etc.

Users who just registered, please write an email to
forum@trade-commander.de
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
mdg
Posts: 10
Joined: Tue Oct 30, 2018 10:16 pm

Price problem using Tradestation & IBPlugin

Post by mdg »

Currently working on easylanguage in Tradestation and use IBPlugin to submit trades to IB-TWS. For the most part everything is working well except for stocks priced under $5.00. When I submit the orders using easylanguage, the order attribute string looks correct but when the order reaches IB TWS and I check the API log, for some stocks it has increased the price to 4 decimals from 2 decimals which causes the order to be rejected. Can you please advise how I can fix this. Here are some additional details:

Stock testing with is: RIOT


Order attribute strings from Tradestation Easylanguage Print statements:
<++>
Contracts Found= 1.00 SET=STK#CUR=USD#SBL=RIOT#EXC=NASDAQ
conid=292830677.00 is RIOT order type is STPLMT
--- place BUY STPLMT order
uid STPLMT ATTR=#1007=SMART#53=BUY#6=STPLMT#22=0#1=6400#2=4.24#3=4.22


IB-API LOG MESSAGES (Trimmed for clarity)
12:19:40:587 <- 3-45-1879048959-292830677-RIOT-STK--0---SMART-NASDAQ-USD-RIOT-SCM---BUY-6400-STPLMT-4.24-4.2199-GTC
12:19:40:613 -> ---`4-2-1879048959-110-The price does not conform to the minimum price variation for this contract.-


As you can see, the 4.24 price is honored but the 4.22 price gets changed to 4.2199 which causes the error.


Best Regards,

board_admin
Site Admin
Posts: 243
Joined: Mon Apr 24, 2017 3:24 pm

Re: Price problem using Tradestation & IBPlugin

Post by board_admin »

The RIOT contract receives a mintick of
0.0001
So
4.2199
is in line with that mintick.

However
4.22
should be aligned to
4.22
and not to
4.2199
even when mintick is 0.0001.

Rounding problem.

Solved in version 1515.
Just download from our public google folder.

https://drive.google.com/file/d/10oYHDP ... share_link

Before install, close all applications loading IBPlugin.
Run installation.
Try again.

Post Reply