In the log, I'm getting the message "Error on calling 'OnPositionUpdate' method for strategy ..... : Order quantity has to be greater/equal 0". What would cause this error message ? Below is the section of code, very slightly stripped down, that I believe is causing the error.
Thank you,
Bruce
protectedoverridevoid OnPositionUpdate(IPosition position)
{
ORTrdPositionCurr = position.Quantity;
if (ORTrdPositionCurr < ORTrdPositionPrior)
{
ChangeOrdersStopLoss(ORTrdPositionCurr, ORTrdAllowed);
}
ORTrdPositionPrior = ORTrdPositionCurr;
}

Comment