OPEN-SOURCE SCRIPT
ATR Histogram vs High-Low

//version=5
indicator("RSI+Price Confluence", overlay=false)
rsiSrc = input(close)
rsiLen = input.int(14)
emaRSI = input.int(9)
wmaRSI = input.int(45)
tf = input.timeframe("60")
emaF = input.int(21)
emaS = input.int(52)
// Lấy EMA và WMA của RSI HTF chỉ trong 1 lần request
ema_rsi = request.security(syminfo.tickerid, tf, ta.ema(ta.rsi(rsiSrc, rsiLen), emaRSI))
wma_rsi = request.security(syminfo.tickerid, tf, ta.wma(ta.rsi(rsiSrc, rsiLen), wmaRSI))
// Xác định lực RSI
luc_up = ema_rsi > wma_rsi
luc_down = ema_rsi < wma_rsi
// Lực giá (EMA nhanh & chậm)
gia_up = ta.ema(close, emaF) > ta.ema(close, emaS)
gia_down = ta.ema(close, emaF) < ta.ema(close, emaS)
// Tín hiệu cuối cùng
isUP = luc_up and gia_up
isDOWN = luc_down and gia_down
isNEU = not isUP and not isDOWN
// Vẽ cột tín hiệu, color= đầy đủ
plot(isUP ? 1 : na, title="UP", style=plot.style_columns, color=color.green, linewidth=6)
plot(isDOWN ? -1 : na, title="DOWN", style=plot.style_columns, color=color.red, linewidth=6)
plot(isNEU ? 0 : na, title="NEU", style=plot.style_columns, color=color.yellow, linewidth=6)
// Đường zero
hline(0, "", color=color.gray, linestyle=hline.style_dotted)
indicator("RSI+Price Confluence", overlay=false)
rsiSrc = input(close)
rsiLen = input.int(14)
emaRSI = input.int(9)
wmaRSI = input.int(45)
tf = input.timeframe("60")
emaF = input.int(21)
emaS = input.int(52)
// Lấy EMA và WMA của RSI HTF chỉ trong 1 lần request
ema_rsi = request.security(syminfo.tickerid, tf, ta.ema(ta.rsi(rsiSrc, rsiLen), emaRSI))
wma_rsi = request.security(syminfo.tickerid, tf, ta.wma(ta.rsi(rsiSrc, rsiLen), wmaRSI))
// Xác định lực RSI
luc_up = ema_rsi > wma_rsi
luc_down = ema_rsi < wma_rsi
// Lực giá (EMA nhanh & chậm)
gia_up = ta.ema(close, emaF) > ta.ema(close, emaS)
gia_down = ta.ema(close, emaF) < ta.ema(close, emaS)
// Tín hiệu cuối cùng
isUP = luc_up and gia_up
isDOWN = luc_down and gia_down
isNEU = not isUP and not isDOWN
// Vẽ cột tín hiệu, color= đầy đủ
plot(isUP ? 1 : na, title="UP", style=plot.style_columns, color=color.green, linewidth=6)
plot(isDOWN ? -1 : na, title="DOWN", style=plot.style_columns, color=color.red, linewidth=6)
plot(isNEU ? 0 : na, title="NEU", style=plot.style_columns, color=color.yellow, linewidth=6)
// Đường zero
hline(0, "", color=color.gray, linestyle=hline.style_dotted)
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.