- ago
Hello fellows!

How do set the "minimum price variation" to be sent to TWS in order to avoid the "the price does not conform a minimum price variation for this contract" error message? It most to be no more than 2 decimals.
0
271
Solved
6 Replies

Reply

Bookmark

Sort
- ago
#1
For stocks, the number of Display Decimals are specified in Markets (under "Markets and Symbols"); and for futures under Symbols (also under "Markets and Symbols"); but for futures, the Tick Size is even more important - this should be set per contract, depending on the contract specifications.
1
- ago
#2
Hello Everybody!

Despite in "Markets and Stocks" it's specified 2 Display Decimals for US Stocks, I am still getting InteractiveBrokers 110 message "The price does not conform to the minimum price variation for this contract".

How could I solve it? Am I looking at the wrong parameter?

Thank you in advance!!!!

0
Cone8
 ( 24.56% )
- ago
#3
Please give me an example of the symbol(s) and I'll take a look.
1
- ago
#4
Hi Cone.

This is the dataset:

BBAR BMA CEPU GGAL LOMA TEO TGS TS TX YPF
0
Cone8
 ( 24.56% )
- ago
#5
Sorry, forgot about this one.. on it now...
1
Cone8
 ( 24.56% )
- ago
#6
The answer is that is should be automatic. We thought that the "MinTick" specification for a contract would be the number we should use - no so easy.

It turns out that the MinTick is the minimum used by the contract on ANY exchange... not necessarily the one you're trading on. We need to combine it with the "market rule minimum tick" and use the greater of the two.

Until that's fixed, you just need to do it yourself by passing your limit/stop price to a function like this one:

CODE:
      public double RoundPrice(double price, int decimals = 2)       {          double d = Math.Pow(10, decimals);          return Math.Round(price * d) / d;       }
1
Best Answer

Reply

Bookmark

Sort