The illegal indirections are the *DH and *DL. What are you trying to accomplish?
HTH.
Thanks,
I'm trying to accomplish - if the range is higher than 40 Pips then do not trade.
Updated code below which runs but no trades are entered?
function run()
{
BarPeriod = 60;
LookBack = 100;
set(TICKS);
set(PEEK);
StartMarket = 800;
EndMarket = 900;
vars Price = series(price());
if(hour(UTC) >= 16.30)
exitLong();
if(hour(UTC) >= 16.30)
exitShort();
var DH = dayHigh (UTC,0);
var DL = dayLow (UTC,0);
var Range = DH-DL;
asset("UK100");
Stop = Range;
TakeProfit = Range;
if (Range > 40*PIP)
Lots = 0;
if (*Price > DH && NumOpenLong <1 && hour(UTC) > 9 && hour(UTC) < 16.30)
enterLong();
else if (*Price < DL && NumOpenShort <1 && hour(UTC) > 9 && hour(UTC) < 16.30)
enterShort();
}