Geek,

I've had a little go at this to try to make it simpler for you. I think you might be getting confused by the Day High and Day Low functions, so I'm simply looking at the max & min value of priceHigh & pricelow series over the first hour trading and setting pending orders for those levels. I've commented out a simple One Cancels Other check, I was not sure if it was part of the strategy to take one or both breakouts.

I have also commented out some print lines to help you see what is going on. Uncomment them and check your log if you want to see what's going on bar by bar.

Code:
function run()
{
	
	set(TICKS+LOGFILE);
	
	BarPeriod = 30;
	LookBack  = 3;
	Hedge = 2;
	
	
	StartDate = 20100101;
//	EndDate   = 20100201;

	asset("UK100");
	
	int marketstarthour		= 8;
	int marketstartminute	= 0;
	int marketendhour			= 16;
	int marketendminute		= 30;
	
	vars hi				= series(priceHigh());
	vars lo				= series(priceLow());
	
	//Find the high low range of first hours trading
	vars enthigh		= series(MaxVal(hi,2)); 
	vars entlow 		= series(MinVal(lo,2));
	vars Range			= series(enthigh[0]-entlow[0]);
	
	

	
	
//	printf("\n%2.0d:%2.0d High %4.1f Low %4.1f enthigh %4.1f entlow %4.1f range %4.1f",hour(),minute(),hi[0],lo[0],enthigh[0],entlow[0],Range[0]);
//	
	
//	if (NumPendingTotal == 1)   // Take only one trade per day OCO one cancels other Not sure if this was part of strategy or not
//	{
//		for(open_trades)
//		{
//			if (TradeIsPending) exitTrade(ThisTrade);
//		}
//	} 
	
		if ((hour() == marketstarthour+1)
				and (minute() == marketstartminute))
		{
			
//			printf("\nenthigh = %4.1f; entlow = %4.1f; Range = %4.1f; PIP = %4.1f",enthigh[0],entlow[0],Range[0],PIP);
//			
			
			if (Range[0] < 40*PIP) 		// Don’t trade if range is higher than 40 points
			{
//				printf("\nRange %4.1f < 40 pips, entering pending trades at enthigh %4.1f & entlow %4.1f,price %4.1f",Range[0],enthigh[0],entlow[0],priceClose());

				EntryTime = 15;											// Expire pending trades at 4:30
				
				enterLong(0,enthigh[0],Range[0],Range[0]);
				enterShort(0,entlow[0],Range[0],Range[0]);		//Buy on the breakout of the lowest low or the highest high of that first hour
			}
			
		}
		
		if (((hour() >= marketendhour)
				and (minute() >= marketendminute)) and (NumOpenTotal > 0))
		{
//			printf("\nExiting Open Trades");
			exitLong();
			exitShort();
		}
}