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
CM MacD Ult MTF V2.1 calculates the MACD line from fast and slow SMA or EMA values, a signal line, and a histogram of their difference. An optional indicator timeframe can use another chart resolution. Users can show or hide the lines and histogram, color the lines by trend, highlight price bars, and mark crosses with dots or a background. Alerts fire on MACD crosses, including optional zero-line filters, and are set for bar close only. It does not place trades.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Indicator TimeFrame
timeframe
res
Fast Length
int
12
fast_length
Slow Length
int
26
slow_length
Source
source
close
src
Signal Smoothing
int
9
signal_length
Oscillator MA Type
string
EMA
sma_source
Signal Line MA Type
string
EMA
sma_signal
Show MACD Lines
bool
true
show_macd
MACD Width
int
3
show_macd_LW
Signal Width
int
2
show_signal_LW
Show Histogram
bool
true
show_Hist
-- Width
int
5
show_hist_LW
Show all 29 settings
Setting
Type
Default
Variable
Show MACD Lines w/ Trend Color
bool
true
show_trend
Show Highlight Price Bars
bool
false
show_HB
Show BackGround on Cross
bool
false
show_cross
Show Circle on Cross
bool
true
show_dots
-- Width
int
5
show_dots_LW
MACD Line
color
#FF6D00
col_macd
Signal Line
color
#2962FF
col_signal
Trend Up
color
#4BAF4F
col_trnd_Up
Trend Down
color
#B71D1C
col_trnd_Dn
Above Grow
color
#26A69A
col_grow_above
Fall
color
#B2DFDB
col_fall_above
Below Grow
color
#FF5252
col_grow_below
Fall
color
#FFCDD2
col_fall_below
MACD Cross Up
bool
true
alert_Long
MACD Cross Dn
bool
true
alert_Short
MACD Cross Up & > 0
bool
false
alert_Long_A
MACD Cross Dn & < 0
bool
false
alert_Short_B
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.
The Derivative Oscillator calculates a double-exponentially smoothed Relative Strength Index (RSI) and subtracts its Simple Moving Average (SMA) to form the main oscillator line. A secondary signal line is plotted using an SMA of the main oscillator values. Th
This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome
This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes the difference between a fast and slow moving average, derives a signal line through smoothing, and plots a histogram representing
MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us
Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m
KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev