For the high-low range of the first hour of a trading day, you can use the dayHigh and dayLow functions. In that case, set the EndMarket variable to 1030 so that the "market day" ends at 10:30, one hour after its begin.
http://manual.zorro-trader.com/day.htm Thanks JCL.
I think the below code works for the Stop and TakeProfit, the only thing I am having trouble with is asking Zorro not to trade when the High and Low range exceeds 40*PIP; I'm getting an "illegal indirection" error?
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);
asset("UK100");
Stop = DH-DL;
TakeProfit = DH-DL;
if (*DH-*DL > 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();