Strategy · Pine Script v6 · On the chart

XAUUSD High Probability Strategy

by BERGzie

This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes.

View on GitHub

GitHub stars4on the repository
Pine versionv6current
Lines of code289
Settings20inputs
LicenceNone stated
Last update1 year ago12 Jul 2025

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 High Probability Strategy enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered by an optional UTC trading session. Exits are handled through fixed percentage stop loss and take profit orders, as well as opposite signal reversals. The script draws directly on the price chart, featuring trade labels and an on-screen performance dashboard.

Details

Published by

BERGzie on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, Oscillators & momentum, Volatility & bands, Volume

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
ATR Lengthint10atrPeriod
Supertrend Factorfloat3.0factor
RSI Lengthint14rsiLength
RSI Overboughtint70rsiOverbought
RSI Oversoldint30rsiOversold
MACD Fastint12macdFast
MACD Slowint26macdSlow
MACD Signalint9macdSignal
Volume MA Lengthint20volLength
Volume Spike Multiplierfloat2.0volMultiplier
Stop Loss %float1.5stopLossPercent
Take Profit %float3.0takeProfitPercent
Show all 20 settings
SettingTypeDefaultVariable
Max Risk Per Trade %float2.0maxRiskPerTrade
Use Time FilterbooltrueuseTimeFilter
Start Hour (UTC)int8startHour
End Hour (UTC)int20endHour
Show Trade LabelsbooltrueshowLabels
Show Information TablebooltrueshowTable
Show Equity CurveboolfalseshowEquity
Label SizestringnormallabelSize
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

6 stars

Capital41 Fusion Core Strategy is an overlay trading strategy that combines an exponential moving average trend filter, RSI, Williams %R, and volume/ATR expansion into a composite momentum oscillator. It executes long trades when the smoothed oscillator crosse

Strategy v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Fusion Core Strategy

Parabolic SAR

by g-moe
3 stars

This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR
2 stars

This strategy calculates MACD, ADX trend strength, ATR, and a rolling VWAP resetting at fixed bar intervals. It plots the VWAP line, stop loss levels, and profit targets directly on the price chart. Long positions enter when MACD crosses above its signal line

Strategy v5 TrendOscillators & momentum Repaints
Updated 8 months ago · MIT GitHub repository of MACD & VWAP Strategy with ATR SL/Targets

This strategy generates trade entries by combining up to five normalized 0-100 technical indicators: Relative Strength Index (RSI with divergence detection), Stochastic RSI, Money Flow Index (MFI), Relative Volatility Index (RVI), and Average Directional Index

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TLC 0TO100 Five Indicators Strategy

12-BB

by sam30606
1 stars

This overlay strategy combines a Bollinger-style band with separate ATR upper and lower envelopes and optional ADX, Volume Flow Indicator, and RSI filters. It sizes positions as a percentage of equity. Settings change band length and multiplier, ATR periods an

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of 12-BB

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