I get this output:
main() ES #F,1, BS:2
cci(19, IBM,4) OK
cci(20, IBM,4) OK
cci(21, IBM,4) OK
cci(19, ES #F,4) OK
cci(20, ES #F,4) Failed
cci(21, ES #F,4) OK
cci(19, ES #F,5) OK
cci(20, ES #F,5) OK
cci(21, ES #F,5) OK
note the single "failed" line, from:
In other words, I can create cci(n,s) as long as (n != 20 && s != sym("ES #F,4")).
What is special about cci(20, sym("ES #F,4")) ??????
If I change the chart to "ES #F,2" the cci() no longer fails. If I change it back to "ES #F,1" it fails as before.
Regards
Dave
main() ES #F,1, BS:2
cci(19, IBM,4) OK
cci(20, IBM,4) OK
cci(21, IBM,4) OK
cci(19, ES #F,4) OK
cci(20, ES #F,4) Failed
cci(21, ES #F,4) OK
cci(19, ES #F,5) OK
cci(20, ES #F,5) OK
cci(21, ES #F,5) OK
note the single "failed" line, from:
PHP Code:
function main() {
var nBarState = getBarState();
if (nBarState == BARSTATE_ALLBARS) {
debugPrint("main() "+getSymbol()+","+getInterval()+", BS:"+nBarState+"\n");
var nS;
var nC = 0;
var msers = new Array(1);
var mCCIs = new Array(1);
var sSI = ["IBM,4","ES #F,4","ES #F,5"];
var n;
for(nS = 0; nS < sSI.length; nS++){ // loop through test symbol and time periods in sSI
msers[nS] = sym(sSI[nS]);
for (n=19;n<=21;n++) { // loop through a few CCI lengths
debugPrint("cci("+n+", "+sSI[nS]+") "
+( (mCCIs[nC++] = cci(n,msers[nS])) == null ?"Failed\n":"OK\n"));
}
}
}
return;
}
What is special about cci(20, sym("ES #F,4")) ??????
If I change the chart to "ES #F,2" the cci() no longer fails. If I change it back to "ES #F,1" it fails as before.
Regards
Dave
Comment