예스스탁
예스스탁 답변
2023-04-26 13:54:32
안녕하세요
예스스탁입니다.
input : showrsi(false),showmidband(false),showgrid(false),rsilen(14),rsima(100),emalen(20);
input : level2(10),level3(40),level5(50);
var : orsi(0),adjrsi(0),rma(0),rsiMAv(0);
var : ATRV(0),rmau(0),rmal(0),rmau3(0),rmal3(0),rmau5(0),rmal5(0);
orsi=rsi(rsilen);
adjrsi=close+atr(100)*orsi/100;
rma=ema(adjrsi,rsima);
rsiMAv=ema(adjrsi,emalen);
ATRV = ATR(100);
rmau=rma+atrv*level2/10;
rmal=rma-atrv*level2/10;
rmau3=rma+atrv*level3/10;
rmal3=rma-atrv*level3/10;
rmau5=rma+atrv*level5/10;
rmal5=rma-atrv*level5/10;
Plot1(adjrsi,"rsi");
plot2(rma,"rma",IFf(O>rma,Green,iff(O<rma,Red,White)));
plot3(rmau,"70",Black);
plot4(rmal,"30",Black);
plot5(rmau3,"80",Black);
plot6(rmal3,"20",Black);
plot7(rmau5,"100",Black);
plot8(rmal5,"10",Black);
plot9(rsiMAv,"rsi ma",Yellow);
즐거운 하루되세요
> 흑수돌 님이 쓴 글입니다.
> 제목 : 수식 문의
> 안녕하세요. 아래의 트뷰수식을 예스로 변환하고 싶습니다.
친절한 도움 항상 감사드립니다.
indicator("RSI TREND FILTER",overlay=true)
showrsi=input.bool(false,title='Show RSI Cloud',group='RSI ')
showmidband=input.bool(false,title='Show RSI Mid Band',group='RSI ')
showgrid=input.bool(false,title='Show RSI Levels',group='RSI Levels')
grid=input.color(color.rgb(26, 22, 22, 34),'RSI LEVELS',group='RSI Levels')
rsilen=input.int(14,'RSI LENGTH',group='RSI')
rsima=input.int(100,'RSI 50 level',group='RSI')
emalen=input.int(20,'RSI EMA Length',group='RSI')
orsi=ta.rsi(close,rsilen)
adjrsi=close+ta.atr(100)*orsi/100
rma=ta.ema(adjrsi,rsima)
r1=plot(showrsi?adjrsi:na,display=display.all,title='RSI')
r2=plot(rma,color=open>rma?#00ff08:open<rma?#ff0404:color.white,title='RSI MA',linewidth=2)
fill(r1,r2,color=adjrsi>rma?color.rgb(76, 175, 79, 70):color.rgb(255, 82, 82, 75),title='RSI Cloud',display=showrsi?display.all:display.none)
level2=input.float(10,'RSI LEVEL2',minval=10,maxval=100,group='RSI Levels')
rmau=rma+ta.atr(100)*level2/10
rmal=rma-ta.atr(100)*level2/10
u=plot(rmau,display=showgrid?display.all:display.none,title='70',color=grid)
l=plot(rmal,display=showgrid?display.all:display.none,title='30',color=grid)
fill(u,l,color=color.rgb(232, 237, 242, 82),title='RSI ZeroBand',display=showmidband?display.all:display.none)
level3=input.float(40,'RSI LEVEL3',minval=10,maxval=100,group='RSI Levels')
rmau3=rma+ta.atr(100)*level3/10
rmal3=rma-ta.atr(100)*level3/10
o8=plot(rmau3,display=showgrid?display.all:display.none,title='80',color=grid)
o2=plot(rmal3,display=showgrid?display.all:display.none,title='20',color=grid)
level5=input.float(50,'RSI LEVEL5',minval=10,maxval=100,group='RSI Levels')
rmau5=rma+ta.atr(100)*level5/10
rmal5=rma-ta.atr(100)*level5/10
ul=plot(rmau5,color=grid,display=showgrid?display.all:display.none,title='100')
ll=plot(rmal5,color=grid,display=showgrid?display.all:display.none,title='0')
fill(o8,ul,color=color.rgb(232, 4, 205, 45),title='OverBought')
fill(o2,ll,color=color.rgb(9, 198, 15, 53),title='OverSold')
fill(r2,ul,color=color.rgb(76, 175, 79, 85),title='UP TREND')
fill(r2,ll,color=color.rgb(175, 76, 167, 85),title='DOWN TREND')
rsiMA=ta.ema(adjrsi,emalen)
plot(rsiMA,color=color.yellow)