Data Series in Functions
Posted: May 11 2015
I want to know is there any easy way to save your own data series into an array and feed it to function instead of a built in price series. Here is an example of what I mean.
Current Psuedo Code:
New Pseudo Code:
1. Would this work?
2. Would it work right if I changed the Bollinger Band's price series function to NumericArray?
3. Is there an easy way to do this without rewriting the entire series of functions that are used to calculate BollingerBands?
Current Psuedo Code:
Code: Select all
Value1 = BollingerBand (Close, 50, 2);
Code: Select all
Arrays: CalcClose[50](0);
{Save a Series of values into the Array}
For Value65 = 50 down 1 begin
CalcClose[Value65 + 1] = CalcClose[Value65];
End;
CalcClose[1] = Close + Random(10)
{Calculate the BollingerBand based on the values in the array}
Value1 = BollingerBand (CalcClose, 50, 2);
2. Would it work right if I changed the Bollinger Band's price series function to NumericArray?
3. Is there an easy way to do this without rewriting the entire series of functions that are used to calculate BollingerBands?