@MattY - you would get that error if you put a series definition inside the if() statement. Series need to be created in the same way and in the same order for each iteration of the run function, therefore you shouldn't put them inside flow control statements.

You could try defining your series outside the if() statement, and then wrapping only your entry logic inside the if() statement. Example:

Code:
vars mySeries = series(...);

if(tradeCondition == true)
{
   Entry = priceHigh();
   enterLong();
}