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)