Indicator · Pine Script v5 · On the chart

XAUUSD Strategy - Auto Entry + Smart TP/SL Fixed

by aeiioaeiio

This indicator evaluates gold market conditions using a multi-factor confluence model on the price chart.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code780
Settings40inputs
LicenceNone stated
Last update4 months ago6 Jun 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 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

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 Strategy - Auto Entry + Smart TP/SL Fixed combines Stochastic, RSI, triple EMAs, Fibonacci retracements, automated support and resistance levels, wick reclaims, and volume spikes into an aggregate scoring system. When confluence scores meet user thresholds, it plots trade signals alongside dynamic swing- and ATR-based stop loss and take profit projections. Configurable inputs allow fine-tuning of indicator periods, scoring weights, risk-reward ratios, and chop filters. As an indicator, it displays trade setups without executing orders directly.

Details

Published by

aeiioaeiio on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Trend, Oscillators & momentum, Support & resistance, SMC / ICT / price action

Markets

Gold

Timeframes

Any timeframe

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
Stoch Periodint5stoch_period
Stoch Kint3stoch_k
Stoch Dint3stoch_d
Oversoldint20oversold
Overboughtint80overbought
RSI Periodint14rsi_period
EMA Fastint20ema_fast
EMA Slowint50ema_slow
EMA Trendint200ema_trend
Fib Lookbackint50fib_lookback
Fib Tolerancefloat0.008fib_tol
SR Pivot Lookbackint20sr_lookback
Show all 40 settings
SettingTypeDefaultVariable
Min SR Touchesint2sr_touch_min
SR Zone Width (pip)float3.0sr_zone_width
Show SR Labelsbooltrueshow_sr_label
Min Wick Reclaim %float0.45wick_reclaim_min
Sweep+Reclaim Scoreint2sweep_score_weight
Show READY Signalbooltrueshow_ready_signal
Continuation Max Body x Avgfloat0.85cont_body_max
Continuation Scoreint2cont_score_weight
Require EMA20 Holdbooltruerequire_ema_hold
Volume MA Lengthint20vol_length
Volume Spike xfloat1.5vol_mult
Full Signal Scoreint5score_full
Early Signal Scoreint4score_early
R:R Ratiofloat1.5rr_ratio
SL Buffer pipint5sl_buf
SL Swing Lookbackint5sl_lookback
Minimum RRfloat1.2min_rr
ATR Periodint14atr_period
ATR SL Bufferfloat0.3atr_sl_mult
Use ATR Dynamic SLbooltrueuse_atr_sl
Use No Trade Filterbooltrueuse_no_trade_filter
Low ATR Filter xfloat0.75atr_flat_mult
EMA Flat Lookbackint5ema_flat_len
EMA Flat Tolerance ATRfloat0.15ema_flat_tol_atr
Avoid Extreme Wick Entrybooltrueavoid_extreme_wick
Extreme Wick %float0.65extreme_wick_ratio
Entry Buffer ATRfloat0.10entry_buffer_atr
TP1 RRfloat1.0tp1_rr
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

3 stars

Pieki Algo is an all-in-one technical analysis indicator that overlays trading signals, trend visualizers, and Smart Money Concepts onto the main price chart. It plots buy and sell signals based on configurable sensitivity settings, colors candles by trend or

Indicator v5 SMC / ICT / price actionTrend Repaints
Updated 12 months ago · None stated GitHub repository of Pieki Algo Signals & Overlays

This indicator detects higher-timeframe order blocks and fractals to generate scored reversal signals directly on the price chart. It evaluates candidate setups using a multi-factor scoring system incorporating RSI momentum, trend EMAs, midpoint distance, and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
1 stars

Combined Indicators v5 Fixed merges multiple technical tools into a single price chart overlay. It identifies Smart Money Concepts structure such as Break of Structure, Change of Character, Order Blocks, Fair Value Gaps, and equal highs or lows. Additionally,

Indicator v5 SMC / ICT / price actionOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combined Indicators v5 Fixed
9 stars

This indicator quantifies the risk of a prevailing market structure break by combining trend context, structure, and momentum into a composite 0–100 risk score. It plots an RSI oscillator with momentum divergence lines in a separate pane while projecting key b

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated yesterday · MIT GitHub repository of Structure Break Risk
575 stars

This indicator detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult

Indicator v5 Support & resistanceTrend
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows with Screener

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