Hi,
When I change the barIndex form 0 to -1 for the cci I get the same value?
function preMain() {
setPriceStudy(false);
setStudyTitle("CCI");
setCursorLabelName("CCI",0);
setCursorLabelName("CCI last",1);
setDefaultBarFgColor(Color.blue,0);
setDefaultBarThickness(2,0);
}
var cbCCI_Var = 0;
var cbCCI = 0;
var nCCIPeriod = 14;
var nCCISource = "hlc3()";
function main() {
cbCCI = cci(14,hlc3(),null,null,0);
cbCCI_last = cci(14,hlc3(),null,null,-1);
// cbCCI_Var = cci(14,nCCISource).toFixed(2)*1;
var retArray = new Array(2);
setBarFgColor(Color.blue, 0);
setBarFgColor(Color.red, 1);
retArray[0] = cbCCI;
retArray[1] = cbCCI_last;
return retArray;
}
Thanks
Tom
When I change the barIndex form 0 to -1 for the cci I get the same value?
function preMain() {
setPriceStudy(false);
setStudyTitle("CCI");
setCursorLabelName("CCI",0);
setCursorLabelName("CCI last",1);
setDefaultBarFgColor(Color.blue,0);
setDefaultBarThickness(2,0);
}
var cbCCI_Var = 0;
var cbCCI = 0;
var nCCIPeriod = 14;
var nCCISource = "hlc3()";
function main() {
cbCCI = cci(14,hlc3(),null,null,0);
cbCCI_last = cci(14,hlc3(),null,null,-1);
// cbCCI_Var = cci(14,nCCISource).toFixed(2)*1;
var retArray = new Array(2);
setBarFgColor(Color.blue, 0);
setBarFgColor(Color.red, 1);
retArray[0] = cbCCI;
retArray[1] = cbCCI_last;
return retArray;
}
Thanks
Tom
Comment