I have an order that is randomly dissappearing. I say randomly because the code is being called but some times that order is showing up and other times it is not, despite the code always showing a print statement.
LongAdjustedStop is the name of the order and it is supposed to be called and the order submitted when LongLimit is filled.
Here is the code that I have for it that is found in OnExecution:
if (LongLimit != null
&& LongLimit.OrderState == OrderState.Filled
&& LongStopB != null
&& LongAdjustedStop == null)
{
LongAdjustedStop = ExitLongStop(0,true,positionSize,adjustedStopLong,"LongAdjustedStop","LongEntryB");
Print(Time[0] + " Hello, LongAdjustedStop is being called!");
Print("LongAdjustedStop Price: " + adjustedStopLong + " At Time: " + Time[0]);
testBool = true;
Print("LongAdjustedStop = " +LongAdjustedStop);
}
In both cases the Print statement of "Hello, LongAdjustedStop is being called!" is showing up and therefore it does not appear to be a problem with the conditional statements. I don't know what else to Print at this point or where else to look in order to find why this is not submitting the order?
Could you help me with what I should be looking at?
Thank you very much!

Comment