Strategy designed for gold trading using a combination of Stochastic, RSI, fast and slow EMAs, ATR, and optional higher-timeframe M15 triggers with Fibonacci levels.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
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 Strategy V4.21C - Entry Instrumentation generates trend-confirmation and scalp trade signals for long and short entries. Risk management uses swing high or low lookbacks buffered by ATR for stop losses, along with target risk-to-reward ratios for take profit exits. Main settings configure indicator periods, trade leg enabling, risk-reward ratios, and M15 trigger requirements. The script plots entry context labels, key Fibonacci zones, and an on-screen dashboard directly on the price chart.
Stochastic, RSI, and triple EMA signal generation
M15 overbought and oversold rejection wick triggers
Fibonacci and EMA tolerance zone filters
ATR-buffered swing lookback stop loss and fixed risk-reward targets
On-chart entry context labels and informational status dashboard
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Stoch Period
int
5
stochLen
Stoch K
int
3
stochKLen
Stoch D
int
3
stochDLen
RSI Period
int
14
rsiLen
EMA Fast
int
20
emaFastLen
EMA Slow
int
50
emaSlowLen
EMA Trend
int
200
emaTrendLen
ATR Period
int
14
atrLen
Backtest Mode
string
Confirm Only
mode
Use Closed Bar Only
bool
true
useConfirmedBar
Enable BUY CONFIRM
bool
true
enableBuyConfirm
Enable SELL CONFIRM
bool
true
enableSellConfirm
Show all 40 settings
Setting
Type
Default
Variable
Enable LSB SCALP
bool
false
enableLsbScalp
Enable LSS SCALP
bool
false
enableLssScalp
Show Disabled Scalp Marks for Review
bool
false
showDisabledLegs
M15 Sell OB Level
float
70
sellOb
M15 Buy OS Level
float
30
buyOs
M15 Rejection Wick %
float
0.35
wickPct
Require M15 Trigger for Confirm
bool
true
requireM15
Fib Lookback
int
50
fibLookback
Fib/EMA Zone Tolerance x ATR
float
0.45
fibTolAtr
No Chase Distance from EMA20 x ATR
float
1.35
noChaseAtr
BUY Confirm TP RR
float
1.5
rrBuyConfirm
SELL Confirm TP RR
float
1.6
rrSellConfirm
Scalp TP RR
float
0.8
rrScalp
Confirm SL Buffer x ATR
float
0.35
slAtrBuf
Scalp SL Buffer x ATR
float
0.12
scalpSlAtr
Confirm SL Swing Lookback
int
8
swingLb
Scalp SL Swing Lookback
int
3
scalpLb
Show Dashboard
bool
true
showDash
Show Signals
bool
true
showSignals
Show Watch Marks
bool
true
showWatch
Show Key Fib
bool
true
showFib
Show Entry Context Labels
bool
true
showEntryContextLabels
Compact Label Text
bool
true
showCompactContext
Block Trade if SL too wide
bool
false
useRiskBlock
Max SL Distance (price points)
float
60.0
maxSlPoints
Block Trade during ATR Spike
bool
true
useAtrSpikeBlock
ATR Spike MA Length
int
50
atrSpikeLen
Max ATR x Average ATR
float
1.55
atrSpikeMult
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.
This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R
This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th
LuxAlgo Hybrid Gold Scalper is a price-chart strategy aimed at gold. It stacks a fast, slow, trend and 200-period bias EMA to mark trend direction, then filters strength with RSI, ADX and an intraday VWAP. Swing highs and lows are marked from pivot length. Set
This strategy automates the TradingLatino methodology by evaluating Squeeze Momentum combined with the Average Directional Index (ADX). It executes long or short positions based on momentum shifts and directional strength. Risk management options include const
This long-only strategy calculates three exponential moving averages with lengths of 50, 100, and 150 periods, plotting them directly on the price chart. It also calculates a 14-period RSI and MACD. The strategy opens long positions when the moving averages al
This long-only trend-following strategy combines Ichimoku Kinko Hyo components with higher timeframe moving average filters. It triggers long entries when price trades above a higher timeframe EMA and a bullish Tenkan-Sen cross above Kijun-Sen occurs under fav