커뮤니티

수고하십니다

프로필 이미지
비듬싸순
2024-10-16 21:38:00
629
글번호 184330
답변완료
수고하십니다 트레이딩뷰챠트인데 예스로 변환 가능할지요 부탁드립니다 //@version=4 study("RSI + backlight overbought / oversold", shorttitle="RSI + BOO", overlay=false) //input len = input(title="RSI len", defval=14, type=input.integer, inline="1") src = input(title="Source", defval=close, type=input.source, inline="1") upli = input(title="Up line limit", defval=70, type=input.integer, inline="2") lowli = input(title="Down line limit", defval=30, type=input.integer, inline="2") theme = input(title="Mode", defval="Dark", type=input.string, options=["Dark","Light"]) //rsi rsilevel = rsi(src, len) //calculations RSI lines ob = 100 upper = ob - lowli lower = ob - upli center = ob - 50 zero = 0 //mode settings color colorred = (na) color colorgreen = (na) color coloryellow = (na) color colorwhite = (na) color coloraqua = (na) modeDark = if theme == "Dark" colorred := color.red colorgreen := color.green coloryellow := color.yellow colorwhite := color.white coloraqua := color.aqua modeLight = if theme == "Light" colorred := color.red colorgreen := color.green coloryellow := color.blue colorwhite := color.green coloraqua := color.yellow //display RSI lines (center, overbought, oversold) upline = plot(upper, color=colorred, title="Up line", linewidth=2) dnline = plot(lower, color=colorgreen, title="Down line", linewidth=2) ctr = plot(center, color=colorwhite, transp=50, title="Center line") //display rsi rsiover = plot(rsilevel, color=coloryellow, title="RSI", transp=30) //calculations RSI overbought and oversold lines for filling lineupper = (rsilevel > upper) ? upper : rsilevel linelower = (rsilevel < lower) ? lower : rsilevel lu = plot(lineupper, color=colorred, title="Overbought", transp=100) ll = plot(linelower, color=colorgreen, title="Oversold", transp=100) //filling lines fill(ll, rsiover, color=colorgreen, transp=20, title="Fill background oversold zone") fill(lu, rsiover, color=colorred, transp=20, title="Fill background overbought zone") fill(upline, dnline, color=coloraqua, transp=80, title="Fill background between Up line and Down line") fill(ctr, upline, color=colorred, transp=100, title="Fill background from center line to Up line") fill(ctr, dnline, color=colorgreen, transp=100, title="Fill background from center line to Down line")
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-10-17 14:34:46

안녕하세요 예스스탁입니다. input : len(14); input : upli(70); input : lowli(30); input : theme("Dark"); var : rsilevel(0),ob(0),upper(0),lower(0),center(0),zero(0); var : lineupper(0),linelower(0); //rsi rsilevel = rsi(len); //calculations RSI lines ob = 100; upper = ob - lowli; lower = ob - upli; center = ob - 50; zero = 0; plot1(upper,"Up line",Red); plot2(lower,"Down line",Green); plot3(center,"Center line",White); plot4(rsilevel, "RSI", Yellow); lineupper = IFf(rsilevel > upper, upper , rsilevel); linelower = IFf(rsilevel < lower, lower , rsilevel); plot5(lineupper,"Overbought",Red); plot6(linelower,"Oversold",Green); 즐거운 하루되세요 > 비듬싸순 님이 쓴 글입니다. > 제목 : 수고하십니다 > 수고하십니다 트레이딩뷰챠트인데 예스로 변환 가능할지요 부탁드립니다 //@version=4 study("RSI + backlight overbought / oversold", shorttitle="RSI + BOO", overlay=false) //input len = input(title="RSI len", defval=14, type=input.integer, inline="1") src = input(title="Source", defval=close, type=input.source, inline="1") upli = input(title="Up line limit", defval=70, type=input.integer, inline="2") lowli = input(title="Down line limit", defval=30, type=input.integer, inline="2") theme = input(title="Mode", defval="Dark", type=input.string, options=["Dark","Light"]) //rsi rsilevel = rsi(src, len) //calculations RSI lines ob = 100 upper = ob - lowli lower = ob - upli center = ob - 50 zero = 0 //mode settings color colorred = (na) color colorgreen = (na) color coloryellow = (na) color colorwhite = (na) color coloraqua = (na) modeDark = if theme == "Dark" colorred := color.red colorgreen := color.green coloryellow := color.yellow colorwhite := color.white coloraqua := color.aqua modeLight = if theme == "Light" colorred := color.red colorgreen := color.green coloryellow := color.blue colorwhite := color.green coloraqua := color.yellow //display RSI lines (center, overbought, oversold) upline = plot(upper, color=colorred, title="Up line", linewidth=2) dnline = plot(lower, color=colorgreen, title="Down line", linewidth=2) ctr = plot(center, color=colorwhite, transp=50, title="Center line") //display rsi rsiover = plot(rsilevel, color=coloryellow, title="RSI", transp=30) //calculations RSI overbought and oversold lines for filling lineupper = (rsilevel > upper) ? upper : rsilevel linelower = (rsilevel < lower) ? lower : rsilevel lu = plot(lineupper, color=colorred, title="Overbought", transp=100) ll = plot(linelower, color=colorgreen, title="Oversold", transp=100) //filling lines fill(ll, rsiover, color=colorgreen, transp=20, title="Fill background oversold zone") fill(lu, rsiover, color=colorred, transp=20, title="Fill background overbought zone") fill(upline, dnline, color=coloraqua, transp=80, title="Fill background between Up line and Down line") fill(ctr, upline, color=colorred, transp=100, title="Fill background from center line to Up line") fill(ctr, dnline, color=colorgreen, transp=100, title="Fill background from center line to Down line")