// ============ GO SHORT ===============================
if (Position.MarketPosition != MarketPosition.Short)
{
if (FirstTickOfBar && CrossDN) //entryOrderS == null &&
{
if (entryOrderL != null) CancelOrder(entryOrderL); // cancel any unfilled Long orders
shortEntry = Close[i] - entryBuffer;
if (Position.MarketPosition == MarketPosition.Long) // if currently Long, pull Long Stop up to Short entry
{
// in case we don't hit the limit, Trade Mgmt will go back to old stop if PL flips before exit...
if (isNewStop( ref stopLong, shortEntry, true)) stopLong = 0;
}
stopShort = 0; // Set short stops
isNewStop( ref stopShort, shortEntry+maxStopLoss*TickSize, false);
entryOrderS = EnterShortStopLimit(0, true, DefaultQuantity, shortEntry, shortEntry, nameShort);
The names used are different: "Long " & "Short " respectively so there should be no conflict.
I searched the help for "internal order handling" per the log message but got no hits.

Comment