Hi jbhunter,

The code is in the contract.c script in the include folder. Look for the function „contractMargin“. Manual section here https://www.zorro-trader.com/manual/en/contract.htm .

I have looked at it briefly and did not find any difference between the IB formula and the formula in the code. Also, no idea where the „Units 90? PCost 0.9? Opn 111?“ come from. Sorry.

But if you code yourself, you will investigate on those functions and resolve it. To my understanding, the key issue is to match the Margin costs in your code with the real margin requirements of IB ?

Last edited by hast29; 07/31/20 08:07.