P
PipsGrowth

RSI Divergence with Adaptive Period

#11 · Momentum / Divergence غير معاد الرسم EA Readable لوحة تنبيهات

The RSI Divergence indicator detects both regular divergences (trend reversal signals) and hidden divergences (trend continuation signals) using RSI. It features an adaptive RSI period that adjusts based on the ATR volatility regime — shorter period in calm markets for sensitivity, longer in volatile markets for stability. Volume confirmation is required to filter false divergences.

كيف يعمل

Swing points are detected using N-bar fractal strength. Regular Bullish Divergence: price makes lower low but RSI makes higher low. Regular Bearish: price higher high, RSI lower high. Hidden Bullish: price higher low, RSI lower low (continuation). Hidden Bearish: price lower high, RSI higher high. RSI period adapts: CALM → shorter, VOLATILE → longer. Failure swings detected as additional confirmation.

إشارات الدخول

  • Regular Bullish: Price lower low + RSI higher low + volume confirmation → BUY (reversal)
  • Regular Bearish: Price higher high + RSI lower high + volume confirmation → SELL (reversal)
  • Hidden Bullish: Price higher low + RSI lower low → BUY (continuation)
  • Hidden Bearish: Price lower high + RSI higher high → SELL (continuation)
  • No-Trade: Divergence strength below minimum threshold

إشارات الخروج

  • TP: Price reaches entry ± (TP_ATR_Mult × ATR)
  • Reversal: Opposite divergence detected
  • Expiry: Signal_Expiry_Bars passed

مرشحات التداول

  • Volume Confirmation: Require volume surge at divergence point
  • Divergence Strength: Min_Divergence_Strength ratio must be met
  • Session: Only signal during configured session hours
  • Spread: Spread > Max_Spread_Points → no signal
  • Cooldown: Last signal < Cooldown_Bars ago → no signal

معاينة الكود المصدري

أول 50 سطر من 1143
PG_11_RSI_Divergence.mq5
MQL5
//+------------------------------------------------------------------+
//| PipsGrowth_RSI_Divergence_Indicator_v1.mq5 |
//| Copyright 2025, Pipsgrowth.com |
//| https://www.pipsgrowth.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2025, Pipsgrowth.com"
#property link "https://www.pipsgrowth.com"
#property version "1.00"
#property indicator_chart_window
#property indicator_buffers 16
#property indicator_plots 4
#property indicator_label1 "BUY Entry"
#property indicator_type1 DRAW_COLOR_ARROW
#property indicator_color1 clrLime
#property indicator_width1 2
#property indicator_label2 "SELL Entry"
#property indicator_type2 DRAW_COLOR_ARROW
#property indicator_color2 clrRed
#property indicator_width2 2
#property indicator_label3 "Exit"
#property indicator_type3 DRAW_COLOR_ARROW
#property indicator_color3 clrAqua,clrOrange,clrGray
#property indicator_width3 2
#property indicator_label4 "Swing Point"
#property indicator_type4 DRAW_COLOR_ARROW
#property indicator_color4 clrDodgerBlue,clrFireBrick
#property indicator_width4 1
//--- Inputs
input group "RSI Settings"
input int RSI_Period_Base = 14; // Base RSI period (adapted by regime)
input int RSI_MA_Period = 9; // RSI smoothing for divergence
input bool Enable_Adaptive_RSI = true; // Adapt RSI period by ATR regime
input group "Swing Detection"
input int Swing_Strength = 2; // N-bar fractal strength
input group "Divergence Detection"
input bool Detect_Regular_Div = true; // Detect regular divergences
input bool Detect_Hidden_Div = true; // Detect hidden divergences
input bool Detect_Failure_Swings = true; // Detect RSI failure swing patterns
input double Min_Divergence_Strength = 1.0; // Minimum divergence strength ratio
input bool Require_Volume_Confirm = true; // Require volume surge at divergence
input double Volume_Surge_Mult = 1.5; // Volume surge multiplier
input int RSI_OB_Level = 70; // RSI overbought level
input int RSI_OS_Level = 30; // RSI oversold level

لأغراض تعليمية فقط. لا تستخدمه بأموال حقيقية. اختبر على حساب تجريبي فقط.

المميزات الرئيسية

Regular and hidden divergence detection
Adaptive RSI period based on ATR regime
RSI failure swing pattern detection
Volume confirmation filter
Swing point visualization on chart
Divergence strength measurement
Color-coded swing points (bull/bear)

معاملات الإدخال

RSI_Period_Base
الافتراضي: 14
Base RSI period (adapted by regime)
RSI_MA_Period
الافتراضي: 9
RSI smoothing for divergence
Enable_Adaptive_RSI
الافتراضي: true
Adapt RSI period by ATR regime
Swing_Strength
الافتراضي: 2
N-bar fractal strength
Detect_Regular_Div
الافتراضي: true
Detect regular divergences
Detect_Hidden_Div
الافتراضي: true
Detect hidden divergences
Require_Volume_Confirm
الافتراضي: true
Require volume surge at divergence
RSI_OB_Level
الافتراضي: 70
RSI overbought level
RSI_OS_Level
الافتراضي: 30
RSI oversold level

تعليمات التثبيت

1حمّل ملف .mq5 من زر التحميل
2افتح MetaTrader 5 ← File ← Open Data Folder
3اذهب إلى MQL5 ← Indicators
4انسخ ملف .mq5 إلى مجلد Indicators
5افتح MetaEditor (F4) واضغط F5 للترجمة
6المؤشر سيظهر في Navigator تحت Indicators
7اسحب المؤشر إلى الرسم البياني
8اختبر على حساب تجريبي أولاً

تحذير صريح: لأغراض تعليمية فقط

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

مجتمع المستخدمين

سجّل دخولك للمشاركةتسجيل الدخول

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

التباعد يتنبأ بضعف الزخم، وليس بالضرورة انعكاسًا. في اتجاه قوي، يمكن لـ RSI أن يجعل قممًا أدنى بينما يجعل السعر قممًا أعلى لفترة طويلة قبل مجيء الانعكاس. إذا كان الاتجاه الأوسع (المرئي على H1 أو H4) لا يزال سليمًا، فإن التباعد الهبوطي على M15 أكثر احتمالاً لإنتاج ارتداد ضحل من انعكاس كامل. استخدم التباعد لتوقع أين فرصة الصفقة، ثم انتظر تأكيد حركة السعر (pin bar، engulfing، كسر البنية) قبل الدخول. بدون ذلك التأكيد، التباعد وحده هو دخول منخفض الاحتمالية.
آخر تحديث: ١١ يوليو ٢٠٢٦

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

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

سجّل دخولك للتحميل

التحميل متاح للأعضاء المسجلين. سجّل الدخول أو أنشئ حساباً مجانياً للوصول إلى الكود المصدري الكامل.

المواصفات

الفئةMomentum / Divergence
الصعوبةAdvanced
الإصدارv1.0
الإطاراتM5, M15, M30, H1
إعادة الرسملا
EAقابل

الأفضل لـ

Divergence tradingReversal and continuation signalsM5-H1 timeframesRSI-based strategies
RSI Divergence with Adaptive Period | مؤشر MT5 مجاني