OPEN-SOURCE SCRIPT

MACD Classic

MACD Classic (Meta4)
This is a Classic MACD indicator designed to replicate the MetaTrader 4 (MT4) version of MACD, featuring clean visuals and dynamic histogram coloring for enhanced usability. Developed with simplicity and precision in mind, this script provides traders with an effective tool to analyze trends and momentum in the market.

Key Features:
Classic MACD Calculation:
Based on the difference between the fast and slow exponential moving averages (EMAs), with a signal line derived from the smoothed EMA of the histogram.

Dynamic Histogram Colors:
The histogram changes its color dynamically to reflect momentum changes:

Green Shades: Positive momentum (above zero) with increasing or decreasing strength.
Red Shades: Negative momentum (below zero) with increasing or decreasing strength.
Signal Line and MACD Line:

The Signal Line (red) provides smooth trend guidance.
The MACD Line (green or red) adapts to the trend direction, giving visual cues for bullish or bearish conditions.
Zero Line Reference:
A zero line is plotted to help you quickly identify trend reversals.

How to Use:
Analyze Trends:

When the MACD Line is above the zero line, the market is in a bullish trend.
When the MACD Line is below the zero line, the market is in a bearish trend.
Generate Buy/Sell Signals:

Buy: When the MACD Line crosses above the Signal Line.
Sell: When the MACD Line crosses below the Signal Line.
Monitor Momentum:

Use the histogram's color and size to gauge the momentum strength and its shifts.
Inputs:
Fast Length: Number of periods for the fast EMA (default: 12).
Slow Length: Number of periods for the slow EMA (default: 26).
Signal Smoothing: Number of periods for the Signal Line smoothing (default: 9).
Source: Input data for calculations (default: close price).
Advantages:
Seamlessly replicates the MetaTrader 4 MACD indicator for familiarity.
Dynamic coloring enhances visualization of market conditions.
Suitable for all timeframes and asset classes.
About the Developer:
This indicator was created by Mohammad reza Deramami, a dedicated trader and developer aiming to provide simple yet powerful tools for the TradingView community. If you find this indicator helpful, feel free to leave feedback or suggestions!
Moving AveragesOscillatorsTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明