At the beginning, things were quite simple, I would need to indicate each new trading day and within, each 30 minute range.
So, after doing that, why is the high and low being plotted for the entire trading day and not only for the selected 30 minute range?
What am I missing?
Regards,
Fernando
Code: Select all
Inputs:
startTime (930),
endTime (1000);
variables:
stTime (false),
sessHi (-999999),
sessLo (+999999),
sessOp (0),
hiValue (0),
loValue (0);
if Date <> Date[1] then begin
if time > startTime and time < endTime then begin
stTime = true;
sessHi = -999999;
sessLo = +999999;
end;
sessOp = Open;
end;
if stTime then begin
if High > SessHi then
SessHi = High;
if Low < SessLo then
SessLo = Low;
hiValue = SessHi;
loValue = SessLo;
end;
if hiValue <> 0 then
plot1(hiValue,"Session High");
if loValue <> 0 then
plot2(loValue,"Session Low");
if sessOp <> 0 then
plot3(sessOp,"Session Open");