I have the following in an EFS file:
function preMain() {
setPriceStudy(true);
_init = true;
}
var _init = true;
function main() {
if(_init)
{
_init = false;
var sym = "IBM,D";
debugPrintln(sym);
//var openP = getValue("Open", 0, -21, sym);
//var openP = getValue("Open", 0, -2, sym);
//var openP = getValue("Open", 0, -1, sym);
//var openP = getValue("Open", 0, 21, sym);
debugPrintln("got here");
}
}
And I have the following questions:
The "got here" debugPrintln() will only be reached when the last 2 getValue() lines are uncommented
AND
If the chart is a daily IBM chart.
"got here" will never be displayed if the chart is anything but IBM daily also "got here" will not be displayed for the first 2 getValue() statements.
[I uncomment each one in turn to test this.]
I was under the impression that the syntax for getValue() was correct for the first getValue() line above?
I also though that you could retrieve the value of any symbol from any chart?
Is anybody else getting the same results that I'm getting here? Can anybody see what I'm doing wrong?
Thanks
function preMain() {
setPriceStudy(true);
_init = true;
}
var _init = true;
function main() {
if(_init)
{
_init = false;
var sym = "IBM,D";
debugPrintln(sym);
//var openP = getValue("Open", 0, -21, sym);
//var openP = getValue("Open", 0, -2, sym);
//var openP = getValue("Open", 0, -1, sym);
//var openP = getValue("Open", 0, 21, sym);
debugPrintln("got here");
}
}
And I have the following questions:
The "got here" debugPrintln() will only be reached when the last 2 getValue() lines are uncommented
AND
If the chart is a daily IBM chart.
"got here" will never be displayed if the chart is anything but IBM daily also "got here" will not be displayed for the first 2 getValue() statements.
[I uncomment each one in turn to test this.]
I was under the impression that the syntax for getValue() was correct for the first getValue() line above?
I also though that you could retrieve the value of any symbol from any chart?
Is anybody else getting the same results that I'm getting here? Can anybody see what I'm doing wrong?
Thanks
Comment