I have been trying to submit live limit orders to TWS (Traders Workstation) automatically using ninjascript. The problem is that occasionally the orders are rejected because they do not comply with the minimum price increment of the given instrument. I found out that that NinjaTrader does round the price of the orders you submit to the nearest valid tick size, which is specified in the corresponding instrument's configuration and by default set to 0.01. However, the stock instruments I am planning to trade (AEB) all have a complex tick size table, which specifies the tick size based on the current price of the instrument (see example below).
Therefore, it is impossible to correct the minimum increment errors by filling in a specific single value in the instrument's configuration. I found out that the TWS API does have methods to request the minimum increment for instruments/contracts (see https://interactivebrokers.github.io...increment.html), but I could not find any documentation on NT's side. Is there any known way to retrieve the correct price increment, either from TWS or the internet? Or is there a logical underlying structure that can be hard-coded in ninjascript?
Thank you for your consideration!
Example tick size table (retrieved from the IB contract database: https://www.interactivebrokers.co.uk...ex.php?f=463):
Comment