Hi I have a question regarding using the inv() function inside an efsInternal call function. Say I want my indicator to do calculations based on a 5 min chart when I'm using a 1 min chart. Something like this:
function main(){
var myStudy0 = ema(10,efsInternal("myFunc", 1,close(inv(5)),open(inv(5)));
}
function myFunc(y, closeP, openP){
var x = closeP.getValue(0)...openP.getValue(0);
return x;
}
Now it seems to work, but the values I'm getting from the indicator is different on a 1 min chart than a 5 min chart. From my understanding the code should work efsInternal passes a series of objects based on 5 min data and the efsInternal function does calculations based on the 5 min data.
Any help would be greatly appreciated. Thanks!
function main(){
var myStudy0 = ema(10,efsInternal("myFunc", 1,close(inv(5)),open(inv(5)));
}
function myFunc(y, closeP, openP){
var x = closeP.getValue(0)...openP.getValue(0);
return x;
}
Now it seems to work, but the values I'm getting from the indicator is different on a 1 min chart than a 5 min chart. From my understanding the code should work efsInternal passes a series of objects based on 5 min data and the efsInternal function does calculations based on the 5 min data.
Any help would be greatly appreciated. Thanks!
Comment