Intraday Exploration in Metastock

#1
Hi Everybody,
I am new to writing metastock explorations.
I have found the below piece of code and it works perfectly fine in the Indicator Builder.


Dear sir
I am giving Metastock Formula for Intraday High low signal. Can it be written in AFL. If so kindly do so.

Formula for intraday High Low
----------------------------
{ Time Inputs }
StHour:=Input("start Hour",0,23,6);
StMin:=Input("start Minute",0,59,0);
EnHour:=Input("last Hour",0,23,9);
EnMin:=Input("last Minute",0,59,0);

{ Time period }
start:=Hour()>StHour
OR Hour()=StHour AND Minute()>=StMin;
end:=Hour()<EnHour
OR Hour()=EnHour AND Minute()<=EnMin;
filter:=
start AND (end OR (start AND Alert(start=0,2)));

{ Start/End time signals }
start:=filter AND Alert(filter=0,2);
end:=filter=0 AND Alert(filter,2);

{ Hi/Lo values }
Hi:=ValueWhen(1,filter,HighestSince(1,start,H));
Lo:=ValueWhen(1,filter,LowestSince(1,ss art,L));

{ Plot on price chart }


But when the same is put on the EXPLORER it does not work fine.
My requirement is to find the high and low in 5 min chart between a certain period and give signal when the levels are crossed after that.

Thanks a ton for the advices....

Maria