i have a question for my NT7 strategy, which i develop in managed mode for the MarketReplay:
I receive a Signal and through EnterLongLimit that get filled later, i have multiple long Entries.
When i receive the next signal, i want to Exit my current long positions and place multiple short limit orders. I do it the following way:
if(Position.MarketPosition == MarketPosition.Long){
ExitLong(Position.Quantity);
}
Print(Time[0] + " enter short limit at: " + ((Close[1] + (TickSize*limitOrderOffset))));
entryOrder1 = EnterShortLimit(0, true, firstProfitQty, (Close[1] + (TickSize*limitOrderOffset)), "Entry1");
entryOrder2 = EnterShortLimit(0, true, secondProfitQty, (Close[1] + (TickSize*limitOrderOffset)), "Entry2");
if((quantity-firstProfitQty-secondProfitQty) > 0){
entryOrder3 = EnterShortLimit(0, true, (quantity-firstProfitQty-secondProfitQty), (Close[1] + (TickSize*limitOrderOffset)), "Entry3");
}
Thank you!

Comment