rsi histogram

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

rsi histogram

Postby veyron89890 » Wed Aug 22, 2018 4:01 am

hello

i need some help i am try to code an rsi with an histrogram derive from two 2 moving average (the signal for the movinga average is the rsi it self) , but when i write this indicator in pine script the istogram start from the 0 level and not the 50 livel like the rsi can you plese give my some tips on how to fix this problem.
can you plese code a version of this indicator for marcket scope .

thank you.

Code: Select all
//@version=3
study(title="Relative Strength Index LEO", shorttitle="RSI")
src = close, len = input(14, minval=1, title="Length")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
rsimoving9 = sma(rsi,9)
rsimoving45 = sma(rsi,45)
rsihistp =  (rsimoving45 - rsimoving9 )
plot(rsi, color=lime)
plot(rsimoving9, color=blue)
plot(rsimoving45, color=yellow)
plot(rsihist,style=histogram , color=red)
band2 = hline(50)
band1 = hline(60)
band0 = hline(40)
veyron89890
 
Posts: 25
Joined: Fri Jan 16, 2015 8:43 am



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 22 guests