PureBytes Links
Trading Reference Links
|
I am trying to write an indicator to plot the current hi and low as the globex session goes on.
{
this indicator will plot the globex High and low as the night goes on and will carry it thru the day.
Rich Davidson
Orig 07/22/99
}
vars:Chi(0),Clow(99999),b(0),XFILE(" ");
b=Currentbar;
if b = 1 then begin
FileDelete("d:\rcd\globex.txt");
end;
print(file("d:\rcd\globex.txt"),b:4:0," ",date:6:0,"time: ",time:4:0," Globex Varible=",globex,globex[1]);
if ((globex[1] = false) and (globex = true)) then begin { globex just started}
print(file("d:\rcd\globex.txt"),b:4:0," ",date:6:0," Globex begin time: ",time:4:0);
Chi = high;
Clow = low;
end;
if globex then begin
if high > chi then Chi = high;
Plot1(Chi,"Current Hi");
if low < clow then clow = low;
Plot2(Clow,"Current Low");
end;
This is what the output looks like in the file
this part works fine
78 990909time: 1615 Globex Varible= FALSE FALSE
79 990909time: 1650 Globex Varible= TRUE FALSE
79 990909 Globex begin time: 1650
80 990909time: 1655 Globex Varible= TRUE TRUE
81 990909time: 1700 Globex Varible= TRUE TRUE
But when globex funtion changes from a true to a false it still triggers my reset function from the line above
if ((globex[1] = false) and (globex = true)) then begin { globex just started}
and I can't see why itdoes this please help
225 990910time: 915 Globex Varible= TRUE TRUE
226 990910time: 935 Globex Varible= FALSE TRUE
227 990910time: 940 Globex Varible= FALSE FALSE
227 990910 Globex begin time: 940
228 990910time: 945 Globex Varible= FALSE FALSE
228 990910 Globex begin time: 945
229 990910time: 950 Globex Varible= FALSE FALSE
229 990910 Globex begin time: 950
230 990910time: 955 Globex Varible= FALSE FALSE
230 990910 Globex begin time: 955
Thanks
Rich
|