| Q&A 게시판 | HOME > Q&A 게시판 |
작성자 :
예스스탁
작성일 : 2021-08-19 17:09:49
조회수 : 423
Re:수식 문의입니다.
안녕하세요
예스스탁입니다.
예스랭귀지로 자체 개발언어입니다.
input : smoothK(3),smoothD(3),lengthRSI(14),lengthStoch(14);
var : src(0),rsi1(0),fk(0),sk(0),sd(0);
src = close;
rsi1 = rsi(lengthRSI);
fk = (rsi1 - Lowest(rsi1,lengthStoch)) / (Highest(rsi1,lengthStoch)-Lowest(rsi1,lengthStoch))*100 ;
sk = ma(fk, smoothK);
sd = ma(sk, smoothD);
plot1(sk,"k",blue);
plot2(sd,"d",MAGENTA);
PlotBaseLine1(80);
PlotBaseLine2(20);
즐거운 하루되세요
>> NoGG 님이 쓴 글입니다.
>> 제목 : 수식 문의입니다.예스트레이더코인에서 사용하는 언어는 무슨 언어인가요 ?
//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
