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

Re: How to init var values prior to CurrentBar = 1?



PureBytes Links

Trading Reference Links

> Subject: How to init var values prior to CurrentBar = 1?
> Date: Sun, 1 Jun 2003 17:33:44 -0500
> From: "Brendan B. Boerner" <brendan@xxxxxxxxxxxxxx>
> To: "Omega-List" <omega-list@xxxxxxxxxx>
>
> Hello,
>
> Suppose I want to average C e.g. value1 = Average(C, 20).  With
> CurrentBar = 1 this works as I expect.
>
> Suppose instead I want to copy C into a variable and average that e.g.
>
> Value1 = C;
> value2 = Average(Value1, 20);
>
> (The reason I want to do this is to compute an average on a
> transformation of C).
>
> The problem is that this won't produce the results I expect until
> CurrentBar = 20 because (using CurrentBar = 1 as reference) Value[20]
> through Value[1] aren't initialized with C[20] through C[1] but
> instead 0.
>
> Does anyone have thoughts on how I can initialize these portions of
> Value1?
>
> Thanks in advance.
>
> Regards,
> Brendan

No luck.   TS doesn't accumulate 'derivative' variables, i.e., variables that
aren't based soley on price (such as another variable) during the MBB
period.  This is an ancient problem.  I doubt that TS6 solved the problem,
although I haven't tested it.  I do not know if arrays also manifest this
problem. You might try that.  Or global variables.

don