OPEN-SOURCE SCRIPT
EMA50 Flux LT (Daily/Weekly)

// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/
// © pizzalolodudu
//version=6
indicator("EMA50 Flux LT (Daily/Weekly)", overlay=true)
// === Inputs ===
lenEMA = input.int(50, "Longueur EMA prix")
obvLen = input.int(20, "OBV MA length")
htf = input.timeframe("W", "Timeframe Flux (HTF)") // Par défaut : Weekly
lineWidth = input.int(6, "Épaisseur EMA", minval=1, maxval=12)
// === EMA50 sur la TF active (ex: Daily chart) ===
ema50 = ta.ema(close, lenEMA)
// === Flux HTF (Weekly ou Monthly) ===
obv_htf = request.security(syminfo.tickerid, htf, ta.cum(math.sign(ta.change(close)) * volume))
obv_ma_htf = request.security(syminfo.tickerid, htf, ta.sma(ta.cum(math.sign(ta.change(close)) * volume), obvLen))
imb_htf = request.security(syminfo.tickerid, htf, (close > open ? 1 : -1))
// === Signaux binaires ===
obv_signal = obv_htf > obv_ma_htf ? 1 : -1
imb_signal = imb_htf > 0 ? 1 : -1
// === Score total revisité ===
score = obv_signal + imb_signal
flux = score > 0 ? 1 : score < 0 ? -1 : 0
// === Couleurs ===
colFlux = flux > 0 ? color.lime : flux < 0 ? color.red : color.orange
colOutline = color.new(color.white, 70)
// === Tracé double couche ===
plot(ema50, color=colOutline, linewidth=lineWidth + 2, title="Contour EMA")
plot(ema50, color=colFlux, linewidth=lineWidth, title="EMA Flux LT")
// © pizzalolodudu
//version=6
indicator("EMA50 Flux LT (Daily/Weekly)", overlay=true)
// === Inputs ===
lenEMA = input.int(50, "Longueur EMA prix")
obvLen = input.int(20, "OBV MA length")
htf = input.timeframe("W", "Timeframe Flux (HTF)") // Par défaut : Weekly
lineWidth = input.int(6, "Épaisseur EMA", minval=1, maxval=12)
// === EMA50 sur la TF active (ex: Daily chart) ===
ema50 = ta.ema(close, lenEMA)
// === Flux HTF (Weekly ou Monthly) ===
obv_htf = request.security(syminfo.tickerid, htf, ta.cum(math.sign(ta.change(close)) * volume))
obv_ma_htf = request.security(syminfo.tickerid, htf, ta.sma(ta.cum(math.sign(ta.change(close)) * volume), obvLen))
imb_htf = request.security(syminfo.tickerid, htf, (close > open ? 1 : -1))
// === Signaux binaires ===
obv_signal = obv_htf > obv_ma_htf ? 1 : -1
imb_signal = imb_htf > 0 ? 1 : -1
// === Score total revisité ===
score = obv_signal + imb_signal
flux = score > 0 ? 1 : score < 0 ? -1 : 0
// === Couleurs ===
colFlux = flux > 0 ? color.lime : flux < 0 ? color.red : color.orange
colOutline = color.new(color.white, 70)
// === Tracé double couche ===
plot(ema50, color=colOutline, linewidth=lineWidth + 2, title="Contour EMA")
plot(ema50, color=colFlux, linewidth=lineWidth, title="EMA Flux LT")
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.