Im trying to write a script to put an indicator on the chart when the RSI levels hit 30. Cannot figure out how to do this. Any suggestions would be great!
Month: May 2020
Help on for command
Hello
I would like to know the nearest flat SSB (ichimoku) value above closing price. I wrote this but this does not work properly and I don’t know why… any idea?
flatichimokulevel=input(9)
isflat(x) =>
out = true
for i = 0 to flatichimokulevel-1
out := out and (x[i] == x[i+1])
out
lowestFlatSSBabove(p) =>
out=close
ssb=leadingSpan2
for i = 0 to (p+displacement)
ssbi=ssb[i]
out := (ssb[i] <= ssb[i+1] and ssb[i] >= close and isflat(ssbi)) ? ssb[i] : out
out