the following code accesses daily data from a 60min chart.
[CODE]
function preMain() {
setPriceStudy(true);
setShowTitleParameters(true);
setShowCursorLabel(true);
}
var bInitialized = false;
var xS1;
function main() {
if (!bInitialized) {
bInitialized = true;
xS1 = sma(3, ohlc4(inv("D")));
}
return xS1.getValue(0);
}
[\CODE]
when I compare this to a daily chart with a basic study (sma length 3, source ohlc/4) this is the same value until 4:30pm EST when the actual daily chart updates and the 60min chart doesn't until several hours later.
any ideas?
[CODE]
function preMain() {
setPriceStudy(true);
setShowTitleParameters(true);
setShowCursorLabel(true);
}
var bInitialized = false;
var xS1;
function main() {
if (!bInitialized) {
bInitialized = true;
xS1 = sma(3, ohlc4(inv("D")));
}
return xS1.getValue(0);
}
[\CODE]
when I compare this to a daily chart with a basic study (sma length 3, source ohlc/4) this is the same value until 4:30pm EST when the actual daily chart updates and the 60min chart doesn't until several hours later.
any ideas?
Comment