Indicator · Pine Script v5 · Own pane

MTF + MACD [Alorse]

by Alorse

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.

View on GitHub

GitHub stars330on the repository
Pine versionv5runs as is
Lines of code114
Settings26inputs
LicenceNone stated
Last update2 months ago25 Aug 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

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.

Details

Published by

Alorse on GitHub

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Oscillators & momentum, Divergence, Moving averages

Markets

Any symbol

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.

Topics

pinescriptpinescript-indicatorspinescript-strategiestrading-strategiestradingviewtradingview-alerttradingview-strategy

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
VersionstringtxtVerversion
Sourcesourceclosesrc
Length   Fastint12fast_length
Slowint26slow_length
Signal Smoothingint9signal_length
OscillatorstringEMAsma_source
Signal LinestringEMAsma_signal
MACD Line  color#2962FFcol_macd
Signal Line  color#FF6D00col_signal
Show Signals&MACD CrossbooltrueshowCross
Above   Growcolor#00796bcol_grow_above
Fallcolor#26a69acol_fall_above
Show all 26 settings
SettingTypeDefaultVariable
Below Growcolor#ef5350col_grow_below
Fallcolor#b71c1ccol_fall_below
Pivot Lookback   Rightint2lbR
Leftint2lbL
Lookback Range   Maxint60rangeUpper
Minint6rangeLower
Plot BullishbooltrueplotBull
Plot Hidden BullishboolfalseplotHiddenBull
Plot BearishbooltrueplotBear
Plot Hidden BearishboolfalseplotHiddenBear
Periodsint50maA
Resolutiontimeframe15resA
Periodsint50maB
Resolutiontimeframe60resB
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

Benso RSI + PMARP

by benso87
24 stars

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

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Benso RSI + PMARP

Relative Strength Index

by deepentropy
13 stars

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

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

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

Indicator v6 TrendMoving averages
Updated yesterday · MIT GitHub repository of Market–Average Relationship Engine [WavesUnchained]

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

Indicator v6 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Hybrid RSI+MFI - Gold Divergence

MACD Divergence

by chaise-cogent
5 stars

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

Indicator v6 Oscillators & momentumDivergence
Updated 7 months ago · MIT GitHub repository of MACD Divergence

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