Currently I'm using the SIM version of NinjaTrader. I've written an app that successfully communicates with NT via NTDirect.dll.
1) Here's the crux of what I'm trying to do: buy long one ES contract and sell short another ES contract at the same time. It seems to me that if I were to use the COMMAND function to place a "BUY" order, then use the same function to place a "SELL" order, that the two would basically just represent the in and out roundtrip of a single position.
2) Now, at the risk of posting two somewhat separate questions in the same thread: I'd like for each contract position to have a "target", and when that target is met the position should be exited at market price automatically. Is there an easy way to exit a position when a target is met (using NTDirect.dll)?
Cheers,
bspires
Comment