I thought I understood how this works, but apparently I do not. I am running a study in Playback mode that has two indicator values that are used. One is Stoch(10,3,3), and the other is CCI(34). I obtain the values of these indicators using:
var study2 = new CCIStudy(34, "HLC/3");
var study3 = new stochK(10, 3, 3);
then
study2.getValue(CCIStudy.CCI, 0);
study3.getValue(0);
Both of these return null values for several more bars than I was expecting. The Stoch study returns null until the beginning of the 20th bar, and the CCI study returns null until the beginning of the 100th bar. I thought I was expecting 10 and 34 bars respectively.
The values returned are correct, just the lookback period is strange.
Any suggestions?
var study2 = new CCIStudy(34, "HLC/3");
var study3 = new stochK(10, 3, 3);
then
study2.getValue(CCIStudy.CCI, 0);
study3.getValue(0);
Both of these return null values for several more bars than I was expecting. The Stoch study returns null until the beginning of the 20th bar, and the CCI study returns null until the beginning of the 100th bar. I thought I was expecting 10 and 34 bars respectively.
The values returned are correct, just the lookback period is strange.
Any suggestions?
Comment