I'm trying to determine if a momentum indicators values are rsing or falling for three consecutive bars.
First, I wrote my own custom StochRSI, and it plots OK.
Next, iwanted to see if I could reference and plot it from another script.
This code works fine, it plots my custom StochRSI:
var Var1;
Var1 = call("/Test/StochRSI.efs");
if(Var1 == null) return;
return Var1;
What I 'd like to do is reference the prior four values - I want to determine if the indicator is rising or falling. I tried this code and while it passes syntax, in applying it to a chart I get a formula error (shown below code). I'm stuck - how can I determine if a
momentum indicator is steadily rising or falling?
var Study1 = null;
function main() {
var Var1;
var Var2;
var Var3;
var Var4;
if(Study1 == null) Study1 = call("/Test/StochRSI.efs");
Var1 = Study1.getValue(0);
Var2 = Study1.getValue(-1);
Var3 = Study1.getValue(-2);
Var4 = Study1.getValue(-3);
TypeError: Study1 has no properties
Yuri
First, I wrote my own custom StochRSI, and it plots OK.
Next, iwanted to see if I could reference and plot it from another script.
This code works fine, it plots my custom StochRSI:
var Var1;
Var1 = call("/Test/StochRSI.efs");
if(Var1 == null) return;
return Var1;
What I 'd like to do is reference the prior four values - I want to determine if the indicator is rising or falling. I tried this code and while it passes syntax, in applying it to a chart I get a formula error (shown below code). I'm stuck - how can I determine if a
momentum indicator is steadily rising or falling?
var Study1 = null;
function main() {
var Var1;
var Var2;
var Var3;
var Var4;
if(Study1 == null) Study1 = call("/Test/StochRSI.efs");
Var1 = Study1.getValue(0);
Var2 = Study1.getValue(-1);
Var3 = Study1.getValue(-2);
Var4 = Study1.getValue(-3);
TypeError: Study1 has no properties
Yuri
Comment