I have this code that works correctly
SetStopLoss("MyLongEntry" + CurrentBar, CalculationMode.Price,(Low[0]- 2*TickSize), false);
But if I make this modification.
private IOrder stopOrder = null;
if (entryOrder != null && entryOrder == execution.Order)
{
if (execution.Order.OrderState == OrderState.Filled || execution.Order.OrderState == OrderState.PartFilled || (execution.Order.OrderState == OrderState.Cancelled && execution.Order.Filled > 0))
{
stopOrder = SetStopLoss("MyLongEntry" + CurrentBar, CalculationMode.Price,(Low[0]- 2*TickSize), false);
}
}
gives this error: you can not implicitly convert the void type.
Would you be so kind as to point me in the right direction? Thank you.
Comment