Strategy · Pine Script v5 · On the chart

XAUUSD SMC Bot

by GifariKemal

This strategy plots on the XAUUSD price chart and looks for Smart Money Concepts entries on the fifteen-minute timeframe.

View on GitHub

GitHub stars15on the repository
Pine versionv5runs as is
Lines of code473
Settings27inputs
LicenceNone stated
Last update8 months ago26 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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 strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

XAUUSD SMC Bot scores fair value gaps, order blocks, liquidity sweeps, break of structure, and change of character, plus EMA, RSI, MACD, and higher-timeframe alignment. It opens a fixed-size position when the confluence score and minimum signal count pass the filters, including optional structure and RSI blocks. Stop loss and take profit are ATR multiples. Session shading and boxes for gaps, order blocks, swings, and a partial-close level can be shown.

Details

Published by

GifariKemal on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

SMC / ICT / price action, Oscillators & momentum, Sessions & time

Markets

Gold

Timeframes

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
SL ATR Multiplierfloat3.0sl_atr_mult
TP ATR Multiplierfloat6.0tp_atr_mult
Min Confluence Scorefloat0.55min_conf
Require BOS or CHoCHbooltruereq_struct
Min SMC Signals (1-4)int2min_smc_sigs
RSI Bounce Protection (>75/<25)booltruersi_protect
RSI Hard Block (>85 / <15)booltruersi_hard_blk
Swing Lookback (each side)int10swing_lb
BOS/CHoCH Lookback (bars)int20struct_lb
FVG Min Size (pips)float5.0fvg_pips
OB Lookback (bars)int20ob_lb
Liquidity Sweep Windowint20sweep_bars
Show all 27 settings
SettingTypeDefaultVariable
FVG Weightfloat0.20w_fvg
Order Block Weightfloat0.25w_ob
Liquidity Sweep Weightfloat0.20w_liq
CHoCH Weightfloat0.30w_choch
BOS Weight (=0.30×0.70)float0.21w_bos
EMA Alignment Weightfloat0.10w_ema
RSI Confirmation Weightfloat0.08w_rsi
MACD Confirmation Weightfloat0.07w_macd
H1 MTF Alignment Bonusfloat0.10w_mtf
Show Session Backgroundsbooltrueshow_sess
Show FVG Boxesbooltrueshow_fvg_b
Show OB Boxesbooltrueshow_ob_b
Show Entry Signalsbooltrueshow_sig
Show Swing Pointsbooltrueshow_swings
Show Partial Close Levelbooltrueshow_partial
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

43 stars

Donald - AI Futures is a price-chart strategy that estimates inner and outer high-low zones and a smoothed close with rational quadratic kernel regression. It builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving

Strategy v5 Oscillators & momentumSMC / ICT / price action Repaints
Updated 2 years ago · None stated GitHub repository of Donald - AI Futures

Daily Bias + FVG Strategy

by TradersPost
218 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy

ARR VWAP Intraday

by hasnocool
106 stars

This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo

Strategy v4 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ARR VWAP Intraday
105 stars

This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
57 stars

This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure MACD 4H + Trailing

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers