When entering a position, few lines after i am creating an Exit stop market order but this is not getting created just after position is created... but in the next closing bar.
how do i set this up to work like ATM strategy. as soon as i enter the position i want the stop market order to be activated.
EnterShort(FirstEntry, "GoShort");
PreviousLowFirstEntry = Low[0];
...few lines later...
//SET EXIT POSITION
if (Position.MarketPosition == MarketPosition.Short)
{
//V4.2.4.3.5 - BREAK EVEN WHEN PSITION IS POSITVE 1 POINT
if (Position.Quantity == 1)
{
ExitShortStopMarket(0, true, 0, PreviousHighFirstEntry, "StopLossShort", "GoShort");
Print(Time[0].ToString() + "Setting Stop Loss: " + PreviousHighFirstEntry.ToString());
}
in this case is the previous low
can you help me?
Thanks

Comment