Can someone please explain why it is necessary or good practice to define variables using -.99999 and .99999 when calling them in a for loop or as trade signals?
Please see the following code snipets:
Code: Select all
Value1=AvgTrueRange(ADRdays);
value2=-999999.;
end;
End;
{now add the stops}
if marketposition=1 then
begin
stop1a= EntryPrice-(stoplossADR*Value1);
if stop1a > value2 then
Begin
value2=stop1a;
stoptype="StopLoss";
Code: Select all
hh = -99999999999; ll = 99999999999;
if nSess>1 then begin
for value90 = 1 to nSess begin
hh = maxlist(hh,ohlcvalues[1+value90*4]);
ll = minlist(ll,ohlcvalues[2+value90*4]);
end;
end
Any guidance is appreciated. Thank you!