This strategy detects regular and hidden RSI divergences from pivot points on a 9-period RSI and trades them with labelled markers and stop lines on the price chart.
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
Only long entries on bullish divergences are enabled by default, and shorts can be switched on. A long exits when RSI crosses a take-profit level, 80 by default, or when an opposite regular divergence appears. The stop loss is off by default and can be a percentage or ATR trailing stop. Sizing is percent of equity.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
RSI Period
int
9
rsiLength
RSI Source
source
close
rsiSource
Take Profit at RSI Level
int
80
takeProfitRSILevel
Pivot Lookback Left
int
1
pivotLeft
Pivot Lookback Right
int
3
pivotRight
Max Lookback Range
int
60
rangeUpper
Min Lookback Range
int
5
rangeLower
Plot Regular Bullish
bool
true
plotRegularBull
Plot Hidden Bullish
bool
true
plotHiddenBull
Plot Regular Bearish
bool
true
plotRegularBear
Plot Hidden Bearish
bool
false
plotHiddenBear
Enable Long Positions
bool
true
enableLong
Show all 25 settings
Setting
Type
Default
Variable
Enable Short Positions
bool
false
enableShort
Stop Loss Type
string
NONE
slType
Stop Loss %
float
5.0
stopLossPercent
ATR Length
int
14
atrLength
ATR Multiplier
float
3.5
atrMultiplier
Min Low Lookback Period
int
12
minLowLookback
Show Debug Info
bool
true
showDebug
Show Position Information
bool
true
showPositionInfo
Show Stop Loss Lines
bool
true
showStopLoss
Bullish Color
color
color.green
bullColor
Bearish Color
color
color.red
bearColor
Hidden Bullish Color
color
color.new(color.green, 70)
hiddenBullColor
Hidden Bearish Color
color
color.new(color.red, 70)
hiddenBearColor
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 overlays a Cipher B style WaveTrend study on the price chart and is titled for Ethereum buy alerts aimed at 3Commas. It calculates a WaveTrend channel and a short moving average, and can mark buy, sell, gold, and divergence dots. Settings change
This overlay strategy combines a Cipher B WaveTrend oscillator with two optional moving averages on the price chart. It exposes WaveTrend channel and average lengths, overbought and oversold levels, buy, sell and gold dots, and regular or hidden divergence mar
Divergenced A002 is a momentum divergence strategy designed to identify entry opportunities using Squeeze Momentum Indicator shifts alongside price action. It enters long when momentum reaches higher lows during lower price lows and enters short on opposite di
This strategy detects bullish and bearish RSI divergences using price and RSI pivot points. A bullish divergence triggers a long entry when price forms a lower low while RSI forms a higher low below 40. A bearish divergence triggers a short entry when price fo
This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w
Divergence Strategy scans multiple technical oscillators to detect regular and hidden divergences against price action. It evaluates customizable indicators including MACD, RSI, Stochastic, CCI, Momentum, OBV, and Money Flow Index to trigger strategy entries o