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

Re: value1 question



PureBytes Links

Trading Reference Links

The code:

   Plot1(byprice,"bp");

plots one point on the bar that is being processed at that time, For example, if the code is processing the data for CurrentBar = 345, it will plot the resulting value on bar 345.

The code:

   For Value1 = 10 downto 0 begin
   Plot1[value1](byprice,"bp");

plots 11 points on the previous 10 bars and then on the current bar. So it you are on bar 345, it will plot on bar 335, 336, ..., 344, then bar 345. In this case, it will plot the same value "byprice" so it will be a horizontal line of value "byprice". If you changed the code to:

   For Value1 = 10 downto 0 begin
   Plot1[value1](byprice[value1],"bp");

it would plot the past 10 and then the current value of "byprice" on the 11 bars.

Such code if usually not executed on every bar but usually used only on certain bars. For example, on a daily chart, the code:

   if DayOfWeek = 5 then begin
      For Value1 = 4 downto 0 begin
      Plot1[value1](Close,"C");
   end;

would plot the Friday closing price on all five days of the week (no corrections for holidays).

Bob Fulks

-------

At 10:03 PM -0700 8/27/00, N&M Smith wrote:

>With this simple plot statement I understand what's going on.
>Plot1(byprice,"bp");
>
>However when I see the same code written with a counter,
>For Value1 = 10 downto 0 begin
>Plot1[value1](byprice,"bp");
>
>I'm having trouble understanding what the [value1] is doing, it appears to
>still be plotting the byprice and the inclusion of the value1 appears to
>displace the indicator, Why I don't know.
>
>If anyone can shed some light on what the process is I'd appreciate it.