Coding session high

 

Hi

Currently coding an EA which is taking into account Asian session high/low for buy/sell signal. Can anyone help me on the code below? I don't get the correct session high/low values:

datetime dt=CurTime();

datetime Asia=StrToTime("01:00");

datetime AsiaClose=StrToTime("10:00");

if (dt == AsiaClose) //Compute Asian Session High

{
TopRangeAS=High[Highest(NULL,0,MODE_HIGH,iBarShift(NULL,0,AsiaClose)-iBarShift(NULL,0,Asia),iBarShift(NULL,0,Asia))]; // High in Asia Session
LowRangeAS=Low[Lowest(NULL,0,MODE_LOW,iBarShift(NULL,0,AsiaClose)-iBarShift(NULL,0,Asia),iBarShift(NULL,0,Asia))]; // Low in Asia Session
{
Print("Identified Asian Session + ["+LowRangeAS+","+TopRangeAS+"]");
}
}

 
if (dt == AsiaClose) //Compute Asian Session High
This will be true only if you get a tick at precisely 10:00:00.000
 
Do you have any idea how to write the code correctly?
Reason: