| Q&A 게시판 | HOME > Q&A 게시판 |
작성자 :
NoGG
작성일 : 2021-08-19 01:28:56
조회수 : 445
수식 문의입니다.
예스트레이더코인에서 사용하는 언어는 무슨 언어인가요 ?
//pine script
// ver 1 alerts show significant stoch rsi crossovers as long as they arent in outermost bounds
// ver 2 fixed error with > to >= that caused some alerts to not appear
// ver 3 changed from symbols to columns to make it easier to set up real trading view alerts with it!
study(title="Stochastic RSI with Crossover Alerts", shorttitle="Stoch RSI with Crossover Alerts")
smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(14, minval=1)
lengthStoch = input(14, minval=1)
src = input(close, title="RSI Source")
rsi1 = rsi(src, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)
plot(k, color=blue)
plot(d, color=orange)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=purple, transp=80)
linecol = k[0] >= d[0] and k[1] <= d[1] and k <= 60 and k >= 5 ? green : white
linecol2 = k[0] <= d[0] and k[1] >= d[1] and k >= 40 and k <= 95 ? red : linecol
data = (60-k[1])/2
data2 = (k[1]-40)/2
plot(k[1] >= d[1] and k[2] <= d[2] and k <= 60 and k >= 10 ? data : na , style=columns,color=green,title="Cross Up Confirmed") // show a green column higher if stoch is deeper
plot(k[1] <= d[1] and k[2] >= d[2] and k >= 40 and k <= 95 ? data2 : na , style=columns,color=red, title="Cross Down Confirmed") // show a red column higher if stoch is higher
//pine script
// ver 1 alerts show significant stoch rsi crossovers as long as they arent in outermost bounds
// ver 2 fixed error with > to >= that caused some alerts to not appear
// ver 3 changed from symbols to columns to make it easier to set up real trading view alerts with it!
study(title="Stochastic RSI with Crossover Alerts", shorttitle="Stoch RSI with Crossover Alerts")
smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(14, minval=1)
lengthStoch = input(14, minval=1)
src = input(close, title="RSI Source")
rsi1 = rsi(src, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)
plot(k, color=blue)
plot(d, color=orange)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=purple, transp=80)
linecol = k[0] >= d[0] and k[1] <= d[1] and k <= 60 and k >= 5 ? green : white
linecol2 = k[0] <= d[0] and k[1] >= d[1] and k >= 40 and k <= 95 ? red : linecol
data = (60-k[1])/2
data2 = (k[1]-40)/2
plot(k[1] >= d[1] and k[2] <= d[2] and k <= 60 and k >= 10 ? data : na , style=columns,color=green,title="Cross Up Confirmed") // show a green column higher if stoch is deeper
plot(k[1] <= d[1] and k[2] >= d[2] and k >= 40 and k <= 95 ? data2 : na , style=columns,color=red, title="Cross Down Confirmed") // show a red column higher if stoch is higher
