Hello,
I try find a solution to create my first indicator. The idea is very simple, if Rsi is crossing 70, his value is 1 and it’s stay at this value until Rsi is crossing 30 and his value is changed to -1. So we have only 2 values 1 and -1. My code is this:
If rsi(5) crosses over 70 then
a = 1
elsif rsi(5) crosses under 30 then
a = -1
endif
return a
But I have no results. Any help it will be appreciate (I have no experience in coding, I try to learn for test some ideeas).
Thank you,
Aurelian
Hello,
( ) vs [ ]
Try replacing rsi(5) with rsi[5](close)