I'm trying to develop an indicator that draw a number 1 when RSI is above 70 and -1 when it's below 30.
int above =(RSI(14, 3)[0] >= 70 ? 1:0);
int below =(RSI(14, 3)[0] <= 30 ? -1:0);
Over70.Set(above);
Below30.Set(below);
Ok. Everything works. But now I'd like to for example, when RSI crossses above 70 remains on 1 as far RSI crosses below 30, and again, remains drown -1 as far RSI goes above 70.
I mean only 1111111111 or -1-1-1-1-1-1 plotted on the chart.
Thanks for help.
Comment