The new getSeries function looks useful, but I'm having no luck getting it to work. I've looked for examples here in the forum and I've studied the help article. Guess it's time to ask for help.
Start with a simple test program like -
This works fine of course. Now I'll modify it to use the getSeries function -
I expect varX to be a pointer to a time series object, and I expect varX.getValue(n) to return the particular value from that object associated with the bar at index n. However ...
There are no error messages, but also no output.
The debug window says "A *** B C A *** B C ..." instead of "A *** B C D A *** B C D ...".
???
Start with a simple test program like -
Code:
//*********************** var varX = null; //*********************** function preMain(){ setPriceStudy(true); debugClear(); debugPrintln("*** Test_GetSeries_3 ***"); } //*********************** function main(){ varX = test(); return varX; } //*********************** function test(){ var var1 = close() + 5; return var1; }
This works fine of course. Now I'll modify it to use the getSeries function -
Code:
//*********************** var varX = null; //*********************** function preMain(){ setPriceStudy(true); debugClear(); debugPrintln("*** Test_GetSeries_3 ***"); } //*********************** function main(){ debugPrintln("A ***"); varX = test(); debugPrintln("D"); return new Array(varX.getValue(0), close(0) - 2); } //*********************** function test(){ debugPrintln("B"); var var1 = close() + 5; debugPrintln("C"); return getSeries(var1); }
There are no error messages, but also no output.
The debug window says "A *** B C A *** B C ..." instead of "A *** B C D A *** B C D ...".
???
Comment