I am trying to implement an indicator determining the time of the high and low of the day.
The values should be displayed on the daily chart.
Therefore i wrote the following indicator logic.
Code: Select all
Vars:
tHigh(0),tlow(0),counter(0),lnow(0),hnow(0);
if Time data2 = sessionendtime(0,1) data2 then
begin
counter=0;
hnow =high data2;
lnow =low data2;
while counter < 150 begin
if hnow < high[counter] data2 then begin
hnow = high[counter] data2;
tHigh=Time[counter] data2;
end;
if lnow > low[counter] data2 then begin
lnow = low[counter] data2;
tlow= Time[counter] data2;
end;
counter=counter +1;
end;
end;
plot1(tlow);
Right now it seems I am lost completly.
Hope one of the forum members can help me out of that.
Best Regards