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

Re: Plotting indicator from the second day loaded in the chart - No solution yet


  • To: vrasys@xxxxxxxxxxxx
  • Subject: Re: Plotting indicator from the second day loaded in the chart - No solution yet
  • From: Jim <jimo@xxxxxxxxxx>
  • Date: Fri, 21 Dec 2001 11:15:41 -0800

PureBytes Links

Trading Reference Links

Vitas <vrasys@xxxxxxxxxxxx> writes:
>The problem remains.  Although the solutions offered will
>start the plot from the  second day loaded in the chart, the
>plot doesn't start at zero because it includes data from the first day
>in the chart.  I need the first day in the chart so that I can reference
>what the price close was for that day.
>
>the indicator is:
>
>plot1(cum(upticks - downticks),"cum tick net");

I'm not familiar with the cum() function, but it sounds like
something that accumulates, probably from the start of the data,
which in this case isn't what you want.  If you can copy the
cum() code to your own version, within the indicator code, then you can
zero the accumulator before starting the real action, like;

var: accumulator(0), ...

...

if daycount > 0 then begin
	accumulator = accumulator + ...; {put stolen cum() code here}
	blah blah blah...
	plot(accumulator, ...);
end
else
	accumulator = 0; {not really necessary here}
	blah blah blah...
end;

Jim