<sigh>
I am trying to create a moving average of the ratio of two market indices. How to I do that?
I want to do something like in main():
if (bInit == false) {
vSeries1 = sym("$ADVQ");
vSeries2 = sym("$DECLQ");
vSeries3 = vSeries1/vSeries2;
vSeries4 = sma(20, vSeries3);
bInit = true;
}
return vSeries4.getValue(0);
BUT this doesn't seem to work.
I am trying to create a moving average of the ratio of two market indices. How to I do that?
I want to do something like in main():
if (bInit == false) {
vSeries1 = sym("$ADVQ");
vSeries2 = sym("$DECLQ");
vSeries3 = vSeries1/vSeries2;
vSeries4 = sma(20, vSeries3);
bInit = true;
}
return vSeries4.getValue(0);
BUT this doesn't seem to work.
Comment