I would like to have the correct and most efficient way of calling a series from another series and return data from a higher timeframe into a lower timeframe when using ticks.
This works for me using minute data higher time frame like 5min in 1min chart:-
function preMain(){
setStudyTitle("RSCI");
setCursorLabelName("RSCI");
}
var CCI = null;
var RSI = null;
function main(){
if(CCI == null) CCI = cci(20, inv(5));
if(RSI == null) RSI = rsi(14, getSeries(CCI));
return getSeries(RSI);
}
But this does not because the indicator does not average itself as with minutes using ticks say in a 1500T chart (using minutes from higher timeframe does work in lower time frame tick chart using above efs):-
function preMain(){
setStudyTitle("RSCI");
setCursorLabelName("RSCI");
}
var CCI = null;
var RSI = null;
function main(){
if(CCI == null) CCI = cci(20, inv("4500T"));
if(RSI == null) RSI = rsi(14, getSeries(CCI));
return getSeries(RSI);
}
Can anyone explain what is wrong and how it can be corrected.
Robert
This works for me using minute data higher time frame like 5min in 1min chart:-
function preMain(){
setStudyTitle("RSCI");
setCursorLabelName("RSCI");
}
var CCI = null;
var RSI = null;
function main(){
if(CCI == null) CCI = cci(20, inv(5));
if(RSI == null) RSI = rsi(14, getSeries(CCI));
return getSeries(RSI);
}
But this does not because the indicator does not average itself as with minutes using ticks say in a 1500T chart (using minutes from higher timeframe does work in lower time frame tick chart using above efs):-
function preMain(){
setStudyTitle("RSCI");
setCursorLabelName("RSCI");
}
var CCI = null;
var RSI = null;
function main(){
if(CCI == null) CCI = cci(20, inv("4500T"));
if(RSI == null) RSI = rsi(14, getSeries(CCI));
return getSeries(RSI);
}
Can anyone explain what is wrong and how it can be corrected.
Robert
Comment