when i run the following code. i dont get anythign but null.... what could be the error. Second, If i want to have two studies on the same chart .. lets say MA (which will be on Prices) and CCI which will be in the indicator panel. How can i put in these two studies in my efs and retrieve values from them. i need the code for PreMain()..
*******************************
function main() {
var vCCI34 = new CCIStudy(144, "HLC/3");
var vBollinger_of_vCCI34 = new BollingerStudy(34, vCCI34, CCIStudy.CCI, 1.618);
mytemp = new Array();
mytemp[0]= vCCI34.getValue(CCIStudy.CCI, -1);
mytemp[1] = vCCI34.getValue(CCIStudy.CCI,0);
BasisVal = vBollinger_of_vCCI34.getValue(BollingerStudy.BASIS );
}
If i check the values of all these variables. they always come out to be null.
*******************************
function main() {
var vCCI34 = new CCIStudy(144, "HLC/3");
var vBollinger_of_vCCI34 = new BollingerStudy(34, vCCI34, CCIStudy.CCI, 1.618);
mytemp = new Array();
mytemp[0]= vCCI34.getValue(CCIStudy.CCI, -1);
mytemp[1] = vCCI34.getValue(CCIStudy.CCI,0);
BasisVal = vBollinger_of_vCCI34.getValue(BollingerStudy.BASIS );
}
If i check the values of all these variables. they always come out to be null.
Comment