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.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//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)