P
PipsGrowth

النقاط الرئيسية

الصعوبة:Beginner
الموثوقية:High
الفئة:trend
الأطر الزمنية:1H, 4H, Daily

MACD (Moving Average Convergence Divergence)

trend📊 1H, 4H, Daily

MACD shows the relationship between two EMAs. Consists of MACD line, signal line, and histogram.

المعادلة

Code
MACD Line = 12-period EMA - 26-period EMA
Signal Line = 9-period EMA of MACD Line
Histogram = MACD Line - Signal Line

شرح تفصيلي

MACD (Moving Average Convergence Divergence) is one of the most popular and versatile technical indicators. It combines trend-following and momentum characteristics.

**Components:** 1. **MACD Line**: Difference between 12 and 26-period EMAs 2. **Signal Line**: 9-period EMA of MACD Line 3. **Histogram**: Visual representation of MACD - Signal difference

**Trading Signals:** - **Crossovers**: MACD crossing signal line - **Centerline Crossovers**: MACD crossing zero - **Divergences**: Price making new highs/lows while MACD doesn't

المعاملات

Fast Period
Default: 12
Fast EMA period
Slow Period
Default: 26
Slow EMA period
Signal Period
Default: 9
Signal line EMA period

📈 إشارات صعودية

MACD crosses above signal line, positive histogram growing, bullish divergence

📉 إشارات هبوطية

MACD crosses below signal line, negative histogram growing, bearish divergence

تطبيق بايثون

Complete MACD with crossover detection

Python
import pandas_ta as ta
macd = ta.macd(df['close'], fast=12, slow=26, signal=9)
df['MACD'] = macd['MACD_12_26_9']
df['MACD_Signal'] = macd['MACDs_12_26_9']
df['MACD_Hist'] = macd['MACDh_12_26_9']
# Detect crossovers
df['macd_bullish'] = (df['MACD'] > df['MACD_Signal']) & (df['MACD'].shift(1) <= df['MACD_Signal'].shift(1))

كود TradingView

JavaScript
//@version=5
indicator("MACD")
[macd_line, signal_line, hist] = ta.macd(close, 12, 26, 9)
plot(macd_line, "MACD", color=color.blue)
plot(signal_line, "Signal", color=color.orange)
plot(hist, "Histogram", style=plot.style_histogram, color=hist >= 0 ? color.green : color.red)
📊 استخدم TradingView للرسوم البيانية المتقدمة
أدوات تحليل احترافية مع أكثر من 100 مؤشر فني
احصل على TradingView Pro

كود MT5

C++
int macd_handle = iMACD(_Symbol, _Period, 12, 26, 9, PRICE_CLOSE);
double macd_main[], macd_signal[];
CopyBuffer(macd_handle, 0, 0, 3, macd_main);
CopyBuffer(macd_handle, 1, 0, 3, macd_signal);

أخطاء شائعة

Trading every crossover without trend context
Ignoring divergences
Using default settings without optimization

إشارات التأكيد

Zero line crossover
Histogram expansion
Price action confirmation

الأفضل لـ

Trend confirmationMomentum measurementDivergence trading

💡 نصائح احترافية

  • Histogram shows momentum strength - larger bars = stronger momentum
  • Divergence between price and MACD often precedes reversals
  • Works best in trending markets, less effective in ranges
آخر تحديث: ٢٩ ديسمبر ٢٠٢٤

إخلاء مسؤولية تعليمي

هذا المحتوى للأغراض التعليمية فقط ولا يُعد نصيحة مالية أو استثمارية. التداول ينطوي على مخاطر كبيرة وقد تفقد رأس مالك. استشر مستشارًا ماليًا مرخصًا قبل اتخاذ أي قرارات استثمارية.

الأسئلة الشائعة