This separate-pane indicator plots a MACD line, a signal line, and a histogram whose colors show whether the histogram is rising or falling above or below zero.
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
The oscillator and signal can each use an SMA or an EMA, and an optional marker highlights MACD and signal crosses. Pivot lookbacks scan the MACD for regular and hidden bullish and bearish divergences, each with its own plot toggle and a minimum-to-maximum bar range. Inputs also set two moving-average periods and higher timeframes for a multi-timeframe EMA component. It does not enter, exit, or size positions.
Four-color MACD histogram
SMA or EMA oscillator and signal
Regular and hidden MACD divergences
Optional MACD and signal cross markers
Two multi-timeframe EMA period and resolution inputs
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Version
string
txtVer
version
Source
source
close
src
Length Fast
int
12
fast_length
Slow
int
26
slow_length
Signal Smoothing
int
9
signal_length
Oscillator
string
EMA
sma_source
Signal Line
string
EMA
sma_signal
MACD Line
color
#2962FF
col_macd
Signal Line
color
#FF6D00
col_signal
Show Signals&MACD Cross
bool
true
showCross
Above Grow
color
#00796b
col_grow_above
Fall
color
#26a69a
col_fall_above
Show all 26 settings
Setting
Type
Default
Variable
Below Grow
color
#ef5350
col_grow_below
Fall
color
#b71c1c
col_fall_below
Pivot Lookback Right
int
2
lbR
Left
int
2
lbL
Lookback Range Max
int
60
rangeUpper
Min
int
6
rangeLower
Plot Bullish
bool
true
plotBull
Plot Hidden Bullish
bool
false
plotHiddenBull
Plot Bearish
bool
true
plotBear
Plot Hidden Bearish
bool
false
plotHiddenBear
Periods
int
50
maA
Resolution
timeframe
15
resA
Periods
int
50
maB
Resolution
timeframe
60
resB
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 indicator computes a scaled Price Percentage Oscillator divergence between fast and slow lookback periods applied to a minimax-transformed stepline of price data. It generates a weighted divergence line using WMA and EMA smoothing, then plots a scaled ver
This indicator plots an RSI and a PMARP line in a separate pane. It calculates RSI from a chosen source and length, then overlays an SMA or EMA signal. Horizontal bull and bear control and critical levels scale the oscillator. Optional arrows mark regular and
The Relative Strength Index indicator calculates momentum based on price changes over a specified length and plots the curve in a separate pane. It includes adjustable upper and lower bands, background color fills, and an optional smoothing moving average or B
This indicator evaluates how price relates to one selected moving-average family rather than treating a crossover as a signal. It scores trend quality, historical respect of the average, extension, compression, acceleration, and exhaustion, then plots a relati
This indicator combines RSI and MFI into a hybrid oscillator scaled to 0-1. It detects divergences by comparing price and MFI slopes from linear regression. The MFI receives extra weight during divergence to amplify the effect. A TMA smooths the hybrid result
This indicator calculates the Moving Average Convergence Divergence (MACD) and signal line in a separate pane to detect regular bullish and bearish divergences. It identifies price pivot highs and lows using a configurable lookback length and compares them aga