I'm programming a strategy in a managed approach and it's working according to the example provided by Ninja Trader in the forum called "SampleOnOrderUpdate". It works perfectly in backtests and replay mode....
Enter command:
Entrada[i] = EnterLongStopLimit(0,true,ncontratos,High[largura+x]+tollimite+tolstop+teto,High[largura+x]+tolstop+teto,"EntryLong"+Convert.ToString(i));
So, the EntryOrder will be live until cancelled. Also, through managed approach the StopGain and StopOrder are being placed and synchronized by Ninja.
I can see in replay mode that once the entry order is filled partially, Ninja puts Stop and Gain also partially ... and if Gain or Stop is fullfilled the other is canceled. It's working.
Before launching it in real market I would like to know what happens if the EntryOrder gets partial filled and the StopGain is reached and filled let's say fullfilled according to the ammout that has been filled by the EntryOrder.....I want in this case that the EntryOrder pending gets cancelled. Will Ninja do it automatically ? Or do I have to command it through script ?
Thanks !

Comment