Hallo Forum
I'm getting a syntax error in "Cutler's RSI". Can anyone correct my mistake?
function main () {
var a = efsInternal("a");
var b = efsInternal("b");
var Upgain = sma(10,efsInternal("a"));
var Downgain = sma(10,efsInternal("b"));
var RS = if (Downgain = 0 {100} [else {Upgain/Downgain} ];
return 100 - (100/(1+RS));
function a() {
if (close>(close(-1)) {
close-close(-1)
}
[else {
0
} ]
function b() {
if (close<(close(-1)) {
close(-1)-close
}
[else {
0
} ]
}
I'm getting a syntax error in "Cutler's RSI". Can anyone correct my mistake?
function main () {
var a = efsInternal("a");
var b = efsInternal("b");
var Upgain = sma(10,efsInternal("a"));
var Downgain = sma(10,efsInternal("b"));
var RS = if (Downgain = 0 {100} [else {Upgain/Downgain} ];
return 100 - (100/(1+RS));
function a() {
if (close>(close(-1)) {
close-close(-1)
}
[else {
0
} ]
function b() {
if (close<(close(-1)) {
close(-1)-close
}
[else {
0
} ]
}
Comment