[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TS2k LastBarOnChart??



PureBytes Links

Trading Reference Links

For indicators (doesn't work for systems) you can still use the
automatic MaxBarsBack if you initialize it on the first bar. Something
like this example. Make it as simple or complicated as you need to make
sure MBB is big enough on the first full pass through the code.

Input: lookbak1(10), lookbak2(50);
Var: mbb(0), mbbset(0);

if currentbar = 1 then begin
  mbb = maxlist(lookbak1, lookbak2);
  mbbset = c[mbb]; {force it to set maxbarsback}
end;

-- 
  Dennis