This is somewhat a continuation to the previous thread: http://www.ninjatrader.com/support/f...119#post322119
This is my code OnBarUpdate:
if(SomeCondition){
CancelMyOrders();
_order_ent = EnterLongStopLimit(_qnt, _price , _price, "Long");
}
...
if(SomeOtherCondition){
CancelMyOrders();
}
private void CancelMyOrders(){
if(_order_ent != null){
Print(Instrument.FullName + ": Cancel Entry Order");
CancelOrder(_order_ent);
}
if(_order_stp != null){
Print(Instrument.FullName + ": Cancel Stop Order");
CancelOrder(_order_stp);
}
if(_order_trg != null){
Print(Instrument.FullName + ": Cancel Target Order");
CancelOrder(_order_trg);
}
}
Also, I do get the debug line in the output window.
What can be the reason?
Thanks.

Comment