I am getting the error in that is mentioned in the title.
When I double click on the error, I am taken to the following line of code:
if (SMA(sMAPeriod)[0] - ((SignalHigh - SignalLow)*StopPerc) > LongStopB.StopPrice))
protected override void OnExecution(IExecution execution)
{
if (LongLimit != null && LongLimit == execution.Order)
{
if (execution.Order.OrderState == OrderState.Filled)
{
ExitLongStop(AvgPrice-(execution.Price - AvgPrice),"LongStopB","LongEntryB");
}
if (SMA(sMAPeriod)[0] - ((SignalHigh - SignalLow)*StopPerc) > LongStopB.StopPrice))
{
ExitLongStop(SMA(sMAPeriod) - ((SignalHigh - SignalLow)*StopPerc),"LongStopB","LongEntryB");
}
}
}
It is then defined in the OnBarUpdate() section as:
LongStopB = ExitLongStop(StopPriceLong,"LongStopB","LongEntryB");
if ("series of conditions")
{
ExitLongStop(StopPriceLong,"LongStopB","LongEntryB");
}
Incidentally, I also receive " ; expected " and when I click on that, it takes me to the same line of code.
Thank you for any help that anyone is able to provide.

Comment