hello all,
in the following example, "hello 0" prints once as expected.
however, if i remove the /* */ commented section, "hello 0" prints 6 times (i'm executing from a daily chart).
also, the commented section is not working. it's supposed to print the last n closes (2 in this example).
thank you in advance,
phil
-------------------------
function preMain() {
setPriceStudy(true);
setStudyTitle("test");
debugClear();
}
function main() {
var indcurr = getCurrentBarIndex();
if (indcurr < 0) {
return;
}
debugPrintln("hi "+indcurr)
/*
var vC = getValueAbsolute("Close", 0, 2, "IBM,D");
for (i = 1; i <= 2; ++i) {
debugPrintln("i="+i+" indcurr="+indcurr + " close="+vC(-i));
}
*/
return;
}
in the following example, "hello 0" prints once as expected.
however, if i remove the /* */ commented section, "hello 0" prints 6 times (i'm executing from a daily chart).
also, the commented section is not working. it's supposed to print the last n closes (2 in this example).
thank you in advance,
phil
-------------------------
function preMain() {
setPriceStudy(true);
setStudyTitle("test");
debugClear();
}
function main() {
var indcurr = getCurrentBarIndex();
if (indcurr < 0) {
return;
}
debugPrintln("hi "+indcurr)
/*
var vC = getValueAbsolute("Close", 0, 2, "IBM,D");
for (i = 1; i <= 2; ++i) {
debugPrintln("i="+i+" indcurr="+indcurr + " close="+vC(-i));
}
*/
return;
}
Comment