I've got an interface between python 2.7 and NinjaTrader 8 using the "NTDirect.DLL" approach.
For the most part things are working, like, I can submit orders from the python code, and they get executed right away in NT8.
However, for calls that return data, sometimes I don't get anything meaningful. For example, the Orders() and OrderStatus() calls in the DLL file return a same 8 or 9 digit number. Its always the same number, no matter if there are open positions, or not, and no matter how many there are.
I know that NinjaTrader does not provide support for using this interface, but I was wondering if anyone here in the forum had any experience that they could pass along?
A second question is when I use the CloseStrategy() call, it takes a LOONG time for the position to be closed and the ATM limit orders to be removed from the books... while all this time is passing the value of the position i wanted to exit can move all over the place. Anyone know why that happens? Am I using it for the wrong things? For the time being I am resorting to FlattenEverything(), or ClosePosition() which seem to work.
Thanks!
Comment