jinqian168

Jinqian168_V2

RSI, EMA of RSI, EMA of RSI's EMA, and Stochastic.
V2 added Price Bar Coloring. Buy when Orange or Green, Sell when Yellow or Red.
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//Created by Jinqian168.
//RSI, EMA of RSI, EMA of RSI's EMA, and Stochastic
//Updated Aug 5, 2015:  Added Price Bar Coloring.  Buy when Orange or Green, Sell when Yellow or Red.

study(title="Jinqian168_V2", shorttitle="Jinqian168_V2", overlay=false)
src = close, 
len = input(14, minval=1, title="RSI Length")
len2 = input(7, minval=1, title="EMA of RSI Length")
len3 = input(5, minval=1, title="EMA of eRSI 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))
eRSI = ema(rsi,len2)
eRSI_Avg = ema(eRSI,len3)

plot(rsi, title="RSI", style=line, linewidth=1, color=black)
plot(eRSI, title="EMA of RSI", style=line, linewidth=1, color=green)
plot(eRSI_Avg, title="EMA of eRSI", style=line, linewidth=1, color=red)
band1 = hline(70, title="OverBoughtRSI", linestyle=dashed, linewidth=1, color=purple)
band0 = hline(30, title="OverSoldRSI", linestyle=dashed, linewidth=1, color=purple)

length1 = input(5, minval=1), smoothK1 = input(3, minval=1), smoothD1 = input(3, minval=1)
k1 = ema(stoch(close, high, low, length1), smoothK1)
d1 = ema(k1, smoothD1)
plot(k1, title="FullK", color=blue)
plot(d1, title="FullD", color=gray)

h0 = hline(80, title="OverBoughtStochastic", linestyle=solid, linewidth=1, color=purple)
h1 = hline(20, title="OverSoldStochastic", linestyle=solid, linewidth=1, color=purple)

barcolor(eRSI > eRSI_Avg and rsi > eRSI_Avg ? green : eRSI >= eRSI_Avg and rsi <= eRSI_Avg ? yellow : eRSI < eRSI_Avg and rsi < eRSI_Avg ? red : eRSI <= eRSI_Avg and rsi >= eRSI_Avg ? orange : na)