I am trading index futures which has 50 shares in 1 lot.
In my code, I have set DefaultQuantity=50 and any order sent is a multiple of 50, e.g. 50,100,150 etc
However, sometimes i see the message that IB has rejected the order of 25 size. I have checked the code and not sure how a order of 25 can be generated.
I have seen this issue multiple times in past few days with high speed execution. NT Strategy gets abruptly terminated.
On log investigation, it seems that SetStopLoss(CalculationMode.Percent, 0.005) command in the code is generating this Stoploss order and hence IB TWS is rejecting the order. However, still I am confused as to how the SL order is getting triggered for a invalid lot size.
Kindly help
Oldmonk
Comment