커뮤니티

부탁드립니다

프로필 이미지
물고기
2020-05-15 13:59:29
861
글번호 138919
답변완료
aLength = input(title="ALength", type=input.integer, defval=2, minval=1) yLength = input(title="YLength", type=input.integer, defval=5, minval=1) zLength = input(title="ZLength", type=input.integer, defval=25, minval=1) obLevel = input(title="ObLevel", type=input.integer, defval=70, minval=1) osLevel = input(title="OsLevel", type=input.integer, defval=30, minval=1) src = input(title="Source", type=input.source, defval=close) hc = highest(src, aLength) lc = lowest(src, aLength) top = ema(ema(src - lc, yLength), zLength) bot = ema(ema(hc - src, yLength), zLength) rs = bot != 0 ? top / bot : 0 rsi = bot == 0 ? 100 : top == 0 ? 0 : 100 - (100 / (1 + rs)) sig = ema(rsi, zLength) hline(obLevel, color=color.green) hline(50) hline(osLevel, color=color.red) rsiColor = rsi > sig or (rsi[1] < osLevel and rsi > osLevel) ? color.green : rsi < sig or (rsi[1] > obLevel and rsi < obLevel) ? color.red : color.blue plot(rsi, color=rsiColor, linewidth=1) plot(sig, color=color.black, linewidth=1) 항상 도움주셔서 감사드립니다 변환 문의드리겠습니다 감사합니다.
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-05-15 14:32:00

안녕하세요 예스스탁입니다. input : aLength(2),yLength(5),zLength(25),obLevel(70),osLevel(30); var : src(0),hc(0),lc(0),top(0),bot(0),rs(0),rsiv(0),sig(0),rsiColor(0); src = close; hc = highest(src, aLength); lc = lowest(src, aLength); top = ema(ema(src - lc, yLength), zLength); bot = ema(ema(hc - src, yLength), zLength); rs = iff(bot != 0 , top / bot , 0); rsiv = iff(bot == 0 , 100,iff( top == 0 , 0 , 100 - (100 / (1 + rs)))); sig = ema(rsiv, zLength); plot1(obLevel,"obLevel",green); plot2(50); plot3(osLevel,"osLevel",red); rsiColor = iff(rsiv > sig or (rsiv[1] < osLevel and rsiv > osLevel) ,green ,iff(rsiv < sig or (rsiv[1] > obLevel and rsiv < obLevel) ,red,blue)); plot4(rsiv,"rsi",rsiColor); plot5(sig,"sig",black); 즐거운 하루되세요 > 물고기 님이 쓴 글입니다. > 제목 : 부탁드립니다 > aLength = input(title="ALength", type=input.integer, defval=2, minval=1) yLength = input(title="YLength", type=input.integer, defval=5, minval=1) zLength = input(title="ZLength", type=input.integer, defval=25, minval=1) obLevel = input(title="ObLevel", type=input.integer, defval=70, minval=1) osLevel = input(title="OsLevel", type=input.integer, defval=30, minval=1) src = input(title="Source", type=input.source, defval=close) hc = highest(src, aLength) lc = lowest(src, aLength) top = ema(ema(src - lc, yLength), zLength) bot = ema(ema(hc - src, yLength), zLength) rs = bot != 0 ? top / bot : 0 rsi = bot == 0 ? 100 : top == 0 ? 0 : 100 - (100 / (1 + rs)) sig = ema(rsi, zLength) hline(obLevel, color=color.green) hline(50) hline(osLevel, color=color.red) rsiColor = rsi > sig or (rsi[1] < osLevel and rsi > osLevel) ? color.green : rsi < sig or (rsi[1] > obLevel and rsi < obLevel) ? color.red : color.blue plot(rsi, color=rsiColor, linewidth=1) plot(sig, color=color.black, linewidth=1) 항상 도움주셔서 감사드립니다 변환 문의드리겠습니다 감사합니다.