Indicator · Pine Script v6 · On the chart

BAKOME HUNTER MT5

by BAKOME-Hub

BAKOME HUNTER MT5 is an overlay indicator that prints buy and sell labels from a linear regression moving average, a Heikin Ashi trend and an ATR volatility check.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code149
Settings19inputs
LicenceMIT
Last update5 months ago14 May 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

149 lines of Pine Script v6 from BAKOME_HUNTER_MT5.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

BAKOME_HUNTER_MT5.pine
//@version=6
indicator("BAKOME HUNTER MT5 (Advanced)", overlay=true, max_labels_count=500)

// ═══════════════════════════════════════════════════════════════
//  Paramètres utilisateur
// ═══════════════════════════════════════════════════════════════
lsmaLength       = input.int(25, "LSMA Length", minval=1)
atrLength        = input.int(14, "ATR Length", minval=1)
volatilityMult   = input.float(1.2, "Volatility Multiplier", step=0.1)

useRSI           = input.bool(true, "Use RSI Filter")
rsiPeriod        = input.int(14, "RSI Period", minval=2)
rsiOB            = input.int(70, "RSI Overbought", minval=1, maxval=100)
rsiOS            = input.int(30, "RSI Oversold", minval=1, maxval=100)

useADX           = input.bool(true, "Use ADX Filter")
adxPeriod        = input.int(14, "ADX Period", minval=2)
adxMin           = input.float(20.0, "Minimum ADX", step=0.5)

useVolumeFilter  = input.bool(true, "Use Volume Filter")
volSmaPeriod     = input.int(20, "Volume SMA Period", minval=1)

useDynamicSLTP   = input.bool(true, "Show ATR-based SL/TP levels")
atrSlMult        = input.float(1.5, "ATR Stop Loss Multiplier", step=0.1)
atrTpMult        = input.float(2.5, "ATR Take Profit Multiplier", step=0.1)

showSignals      = input.bool(true, "Show Buy/Sell Signals")
showLSMA         = input.bool(true, "Show LSMA Line")
showHA           = input.bool(true, "Use Heikin Ashi Trend")
showDashboard    = input.bool(true, "Show Dashboard Table")

// ═══════════════════════════════════════════════════════════════
//  Calculs de base
// ═══════════════════════════════════════════════════════════════
haClose = (open + high + low + close) / 4
var float haOpen = na
haOpen := na(haOpen[1]) ? (open + close) / 2 : (haOpen[1] + haClose[1]) / 2
haBull = haClose > haOpen
haBear = haClose < haOpen

lsma = ta.linreg(close, lsmaLength, 0)

atr = ta.atr(atrLength)
avgAtr = ta.sma(atr, atrLength)
highVolatility = atr > avgAtr * volatilityMult

rsi = ta.rsi(close, rsiPeriod)
adx = ta.adx(adxPeriod)

volumeSma = ta.sma(volume, volSmaPeriod)
volumeConfirmed = volume > volumeSma * 1.2

// ═══════════════════════════════════════════════════════════════
//  Filtres
// ═══════════════════════════════════════════════════════════════
rsiValidBuy  = not useRSI or (rsi < rsiOS)
rsiValidSell = not useRSI or (rsi > rsiOB)

adxValid     = not useADX or (adx >= adxMin)

volumeValid  = not useVolumeFilter or volumeConfirmed

// ═══════════════════════════════════════════════════════════════
//  Tendance globale (LSMA + Heikin Ashi)
// ═══════════════════════════════════════════════════════════════
trendBull = close > lsma and haBull
trendBear = close < lsma and haBear

// ═══════════════════════════════════════════════════════════════
//  Signaux d'entrée
// ═══════════════════════════════════════════════════════════════
buySignalRaw  = trendBull and highVolatility and ta.crossover(close, lsma)
sellSignalRaw = trendBear and highVolatility and ta.crossunder(close, lsma)

buySignal  = buySignalRaw and rsiValidBuy and adxValid and volumeValid
sellSignal = sellSignalRaw and rsiValidSell and adxValid and volumeValid

// ═══════════════════════════════════════════════════════════════
//  Niveaux de TP/SL dynamiques (basés sur ATR)
// ═══════════════════════════════════════════════════════════════
var float atrBuySL = na, atrBuyTP = na, atrSellSL = na, atrSellTP = na
if barstate.isconfirmed
    atrBuySL  := close - atr * atrSlMult
    atrBuyTP  := close + atr * atrTpMult
    atrSellSL := close + atr * atrSlMult
    atrSellTP := close - atr * atrTpMult

// ═══════════════════════════════════════════════════════════════
//  Affichage des signaux
// ═══════════════════════════════════════════════════════════════
if showSignals
    if buySignal
        label.new(bar_index, low, "BUY\nSL: " + str.tostring(atrBuySL, "#.##") + "\nTP: " + str.tostring(atrBuyTP, "#.##"),
                  style=label.style_label_up, color=color.new(color.lime, 0), textcolor=color.black, size=size.small)
    if sellSignal
        label.new(bar_index, high, "SELL\nSL: " + str.tostring(atrSellSL, "#.##") + "\nTP: " + str.tostring(atrSellTP, "#.##"),
                  style=label.style_label_down, color=color.new(color.red, 0), textcolor=color.white, size=size.small)

// ═══════════════════════════════════════════════════════════════
//  Lignes LSMA
// ═══════════════════════════════════════════════════════════════
plot(showLSMA ? lsma : na, color=color.white, linewidth=2, title="LSMA")

// ═══════════════════════════════════════════════════════════════
//  Dashboard (tableau récapitulatif)
// ═══════════════════════════════════════════════════════════════
if showDashboard and barstate.islast
    var table dashboard = table.new(position.top_right, 3, 9, bgcolor=color.new(color.black, 85), border_width=1)
    table.cell(dashboard, 0, 0, "BAKOME HUNTER MT5", text_color=color.yellow, text_size=size.small)
    table.cell(dashboard, 1, 0, "Value", text_color=color.yellow, text_size=size.small)
    table.cell(dashboard, 2, 0, "Status", text_color=color.yellow, text_size=size.small)

    table.cell(dashboard, 0, 1, "LSMA", text_color=color.white)
    table.cell(dashboard, 1, 1, str.tostring(lsma, "#.##"), text_color=color.white)
    table.cell(dashboard, 2, 1, trendBull ? "🟢 BULL" : "🔴 BEAR", text_color=trendBull ? color.lime : color.red)

    table.cell(dashboard, 0, 2, "ATR", text_color=color.white)
    table.cell(dashboard, 1, 2, str.tostring(atr, "#.##"), text_color=color.white)
    table.cell(dashboard, 2, 2, highVolatility ? "HIGH VOL" : "LOW VOL", text_color=highVolatility ? color.orange : color.gray)

    table.cell(dashboard, 0, 3, "RSI", text_color=color.white)
    table.cell(dashboard, 1, 3, str.tostring(rsi, "#.#"), text_color=color.white)
    table.cell(dashboard, 2, 3, rsiValidBuy ? "OK" : "WAIT", text_color=color.green)

    table.cell(dashboard, 0, 4, "ADX", text_color=color.white)
    table.cell(dashboard, 1, 4, str.tostring(adx, "#.#"), text_color=color.white)
    table.cell(dashboard, 2, 4, adxValid ? "STRONG" : "WEAK", text_color=adxValid ? color.green : color.red)

    table.cell(dashboard, 0, 5, "Volume", text_color=color.white)
    table.cell(dashboard, 1, 5, str.tostring(volume, "#"), text_color=color.white)
    table.cell(dashboard, 2, 5, volumeConfirmed ? "HIGH" : "NORMAL", text_color=volumeConfirmed ? color.lime : color.gray)

    table.cell(dashboard, 0, 6, "Signal", text_color=color.white)
    table.cell(dashboard, 1, 6, buySignal ? "BUY" : (sellSignal ? "SELL" : "----"), text_color=color.white)
    table.cell(dashboard, 2, 6, "", text_color=color.white)

    table.cell(dashboard, 0, 7, "TP (ATR)", text_color=color.white)
    table.cell(dashboard, 1, 7, str.tostring(atrBuyTP, "#.##"), text_color=color.green)
    table.cell(dashboard, 2, 7, str.tostring(atrSellTP, "#.##"), text_color=color.green)

    table.cell(dashboard, 0, 8, "SL (ATR)", text_color=color.white)
    table.cell(dashboard, 1, 8, str.tostring(atrBuySL, "#.##"), text_color=color.red)
    table.cell(dashboard, 2, 8, str.tostring(atrSellSL, "#.##"), text_color=color.red)

// ═══════════════════════════════════════════════════════════════
//  Alertes conditionnelles
// ═══════════════════════════════════════════════════════════════
alertcondition(buySignal, title="BUY Signal (BAKOME HUNTER)", message="BAKOME HUNTER BUY SIGNAL")
alertcondition(sellSignal, title="SELL Signal (BAKOME HUNTER)", message="BAKOME HUNTER SELL SIGNAL")

Overview

Optional RSI, ADX and volume filters can be switched on or off. Each signal can show a stop loss and take profit level based on ATR multipliers, and a dashboard table lists the current readings. Alert conditions are included. The levels are drawn as references only, since the script does not manage or place orders.

Details

Published by

BAKOME-Hub on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Trend, Volatility & bands, Oscillators & momentum

Markets

Any symbol

Timeframes

M1-M5, M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
LSMA Lengthint25lsmaLength
ATR Lengthint14atrLength
Volatility Multiplierfloat1.2volatilityMult
Use RSI FilterbooltrueuseRSI
RSI Periodint14rsiPeriod
RSI Overboughtint70rsiOB
RSI Oversoldint30rsiOS
Use ADX FilterbooltrueuseADX
ADX Periodint14adxPeriod
Minimum ADXfloat20.0adxMin
Use Volume FilterbooltrueuseVolumeFilter
Volume SMA Periodint20volSmaPeriod
Show all 19 settings
SettingTypeDefaultVariable
Show ATR-based SL/TP levelsbooltrueuseDynamicSLTP
ATR Stop Loss Multiplierfloat1.5atrSlMult
ATR Take Profit Multiplierfloat2.5atrTpMult
Show Buy/Sell SignalsbooltrueshowSignals
Show LSMA LinebooltrueshowLSMA
Use Heikin Ashi TrendbooltrueshowHA
Show Dashboard TablebooltrueshowDashboard
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup
257 stars

An overlay indicator that combines an ATR-based SuperTrend trailing stop with an integrated RSI-derived midline calculation on the price chart. The SuperTrend uses an ATR period and factor multiplier to plot dynamic green or red trend lines based on price dire

Indicator v5 TrendVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of SuperTrend ATR + RSI
114 stars

ADX Strategy (original) is an overlay indicator that identifies trend-following trade signals using the Average Directional Index (ADX) combined with a Simple Moving Average filter. A long signal is generated when the ADX rises above a user-defined trend level

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Strategy (original)

Moon Dev Lunar Sniper

by moondevonyt
92 stars

Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Lunar Sniper
56 stars

Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision
55 stars

The VibeTrader Signal System is an overlay indicator that identifies trend direction and potential reversal conditions. It calculates a Supertrend line alongside Bollinger Bands and a 14-period RSI indicator. The script highlights bullish and bearish trends by

Indicator v6 TrendVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of VibeTrader Signal System

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers