PureBytes Links
Trading Reference Links
|
At 11:50 AM -0700 1/16/03, Brian S. Hanley wrote:
>So I take it, then, that "data(j)" is basically equivalent to dataN,
>where N is the value of j?
Yes
>Also, are the data series implicitly passed into functions the way
>they're passed into indicators?
Data series are global so can be read by all code.
At 12:17 PM -0700 1/16/03, Brian S. Hanley wrote:
>Also, does anybody know if you can time-shift a data series
>when passing it into a function, like so?
>
>MyVar = Average(MyData[5], 12);
>
>{ Take the moving average of 12 bars ... }
>{ between MyData[16] and MyData[5] ? }
Yes but there as subtle differences between:
MyVar = Average(MyData[5], 12);
and
MyVar = Average(MyData, 12)[5];
so test before you use these forms.
At 1:06 PM -0700 1/16/03, Brian S. Hanley wrote:
>Questions, questions, questions ...
>
>Does anyone know what causes the PowerEditor to diagnose
>a "Unresolvable Data Number" error?
I am guessing that you have not declared the value of a
subscript used to reference the data.
>Also, is it possible to reference values of an array element
>at a previous bar?
>
>eg,
>
>Vars: MyVar(0)
>Array: MyArray[10](0);
>
>MyVar = MyArray[5][2];
>{ Value of MyArray[5] not now but 2 bars ago? }
You had better test that one. It would force the array to have a very
large size (equal to the array size multiplied by the MaxBarsBack
setting).
In most cases it is faster to test these kinds of things rather than
ask since they are pretty obscure and the results have been known to
be different in different versions (and releases?) of TradeStation.
Bob Fulks
|