Thanks for your reply.
It would be best if you are checking that the current price is below the intended long stop price before you place the order.
Example:
if (your entry conditions && GetCurrentAsk() < LongEntry - 5 * TickSize)
{
EnterLongStopMarket(0, true, Convert.ToInt32(ContractSize), LongEntry, "Long"); //place order only when price is 5 ticks or more below the intended entry.
}
Comment