PROTECTED SOURCE SCRIPT
EMA50 Flux H1

// 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 HTF — Version simple (flux direct)", overlay=true)
// === Inputs ===
lenEMA = input.int(50, "Longueur EMA prix")
obvLen = input.int(20, "OBV MA length")
htf = input.timeframe("60", "Timeframe Flux (HTF)")
lineWidth = input.int(6, "Épaisseur EMA", minval=1, maxval=12)
// === EMA50 classique sur la TF active ===
ema50 = ta.ema(close, lenEMA)
// === Flux H1 ===
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))
// === Volume HTF ===
vol_htf = request.security(syminfo.tickerid, htf, volume)
vol_ma_htf = request.security(syminfo.tickerid, htf, ta.sma(volume, obvLen))
// === Signaux binaires ===
obv_signal = obv_htf > obv_ma_htf ? 1 : -1
imb_signal = imb_htf > 0 ? 1 : -1
vol_signal = vol_htf > vol_ma_htf ? 1 : 0
// === Score total ===
score = obv_signal + imb_signal
// === Flux corrigé ===
flux = score > 0 ? 1 : score < 0 ? -1 : 0
// === Couleurs EMA ===
emaColor = flux > 0 ? color.lime : flux < 0 ? color.red : color.orange
// === Plot EMA50 colorée ===
plot(ema50, title="EMA50 Flux HTF", color=emaColor, linewidth=lineWidth)
// © pizzalolodudu
//version=6
indicator("EMA50 Flux HTF — Version simple (flux direct)", overlay=true)
// === Inputs ===
lenEMA = input.int(50, "Longueur EMA prix")
obvLen = input.int(20, "OBV MA length")
htf = input.timeframe("60", "Timeframe Flux (HTF)")
lineWidth = input.int(6, "Épaisseur EMA", minval=1, maxval=12)
// === EMA50 classique sur la TF active ===
ema50 = ta.ema(close, lenEMA)
// === Flux H1 ===
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))
// === Volume HTF ===
vol_htf = request.security(syminfo.tickerid, htf, volume)
vol_ma_htf = request.security(syminfo.tickerid, htf, ta.sma(volume, obvLen))
// === Signaux binaires ===
obv_signal = obv_htf > obv_ma_htf ? 1 : -1
imb_signal = imb_htf > 0 ? 1 : -1
vol_signal = vol_htf > vol_ma_htf ? 1 : 0
// === Score total ===
score = obv_signal + imb_signal
// === Flux corrigé ===
flux = score > 0 ? 1 : score < 0 ? -1 : 0
// === Couleurs EMA ===
emaColor = flux > 0 ? color.lime : flux < 0 ? color.red : color.orange
// === Plot EMA50 colorée ===
plot(ema50, title="EMA50 Flux HTF", color=emaColor, linewidth=lineWidth)
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。