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 indicator, select all of the template text and paste. Press Save and give it a name.
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
A/D Context v20.7 detects divergences between price and flow pivots, with cooldown bars and optional confirmation after the divergence. A historical scan from a chosen start date draws dimmed markers, a regime filter checks EMA slope, and a weighted bias score can shade the background. Profiles follow the chart timeframe or a manual choice.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Flow Mode
string
Williams AD
flowMode
CMF Length
int
20
cmfLen
A/D Smoothing EMA
int
21
emaLen
ATR Length
int
14
atrLen
Auto TF Profile
bool
true
useAutoTfProfile
Manual Profile
string
5m
manualProfile
Pivot Left
int
8
pivotLeftBase
Pivot Right
int
8
pivotRightBase
Min Price Move %
float
0.10
minPriceMovePct
Min A/D Move (fraction)
float
0.20
minAdMovePct
Min Swing ATR
float
0.6
minSwingAtr
Divergence Cooldown Bars
int
15
cooldownBars
Show all 34 settings
Setting
Type
Default
Variable
Post-Divergence Confirm Bars
int
5
confirmBarsAfterDiv
Require Post-Divergence Confirmation
bool
true
requireDivConfirmation
Show Historical Divergences
bool
true
showHistory
History Start Date
time
timestamp("2024-01-01")
histStartDate
History Label Style
string
Circles
histLabelStyle
Show Unconfirmed (bull?/bear?) in History
bool
false
showHistUnconfirmed
Regime Lookback
int
8
regimeLookback
Min EMA Slope %
float
0.15
regimeMinSlopePct
Min EMA Range %
float
0.20
regimeMinRangePct
Regime Confirm Bars
int
3
regimeConfirmBars
Breakout Lookback (base)
int
5
breakoutLen
CMF Strong Threshold
float
0.05
cmfStrong
CMF Weak Threshold
float
0.02
cmfWeak
Weight: Flow Slope
float
1.0
wFlow
Weight: CMF Score
float
1.5
wCmf
Weight: Regime
float
1.0
wRegime
Bias Score Threshold
float
2.0
biasThresh
Show Bias Background
bool
true
showBias
Show CMF
bool
true
showCMF
Show Divergence Labels
bool
true
showDivergence
Show Context Table
bool
true
showTable
Show Normalized Flow (flow_z)
bool
true
showNorm
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.
Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an
This indicator plots the Money Flow Index in a separate pane and marks regular and hidden bullish and bearish divergences between price pivots and the oscillator. It builds the index from positive and negative money flow, then finds pivot highs and lows using
This indicator plots a smoothed Z-score of cumulative volume delta in a separate pane, showing whether buying or selling pressure is dominant and when the reading enters extreme zones. It marks spot accumulation, climax or exhaustion, and pivot-based price-vol
This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus
This indicator is an oscillator suite inspired by Market Cipher B and VuManChu Cipher B that plots in a separate pane. It combines a WaveTrend oscillator, a Money Flow Index (MFI) area, and an RSI indicator with automatic divergence detection. Visual signals h
QPulse is a multi-factor indicator that draws in a separate pane to evaluate market momentum, volume flow, and volatility dynamics. It calculates volume delta, a cumulative delta proxy, advanced adaptive ATR, and a hybrid volume-weighted RSI with overbought an