P
PipsGrowth

ATR Volatility Regime Classifier

#09 · Filter / Risk Management غير معاد الرسم EA Readable لوحة تنبيهات

The ATR Regime Classifier is a master filter that classifies the market into 6 volatility regimes based on ATR relative to its own moving average. It blocks trading during extreme volatility, adjusts parameters in other regimes, and detects regime transitions that signal market regime shifts. This indicator is designed to be used as a filter by other indicators or EAs — it outputs its regime state via buffers readable by any EA.

كيف يعمل

ATR_Ratio = ATR / SMA(ATR, ATR_MA_Period). Regimes: <0.5 CALM, 0.5-0.8 QUIET, 0.8-1.2 NORMAL, 1.2-2.0 ACTIVE, 2.0-3.0 VOLATILE, >3.0 EXTREME. Transitions are detected and logged: Calm→Normal (market waking up), Normal→Volatile (accelerating), Volatile→Extreme (panicking), Volatile→Normal (settling). EXTREME regime = no trade allowed.

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

  • This is a filter indicator — it does not generate BUY/SELL signals directly
  • Outputs regime state via buffer: 0=CALM, 1=QUIET, 2=NORMAL, 3=ACTIVE, 4=VOLATILE, 5=EXTREME
  • Other indicators read this buffer to gate their entries
  • EXTREME regime = all trading blocked

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

  • N/A — filter indicator, does not manage positions
  • Regime transitions are logged for other indicators to act on

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

  • This indicator IS the filter — it classifies market state for other indicators
  • Can be used standalone to visualize volatility regimes
  • EA-readable via CopyBuffer for automated gating

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

أول 50 سطر من 892
PG_09_ATR_RegimeClassifier.mq5
MQL5
//+------------------------------------------------------------------+
//| PipsGrowth_ATR_RegimeClassifier_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 14
#property indicator_plots 5
#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 "ATR/ATR_MA"
#property indicator_type4 DRAW_LINE
#property indicator_color4 clrDodgerBlue
#property indicator_style4 STYLE_SOLID
#property indicator_width4 1
#property indicator_label5 "Regime"
#property indicator_type5 DRAW_COLOR_LINE
#property indicator_color5 clrLime,clrYellow,clrOrange,clrRed,clrGray
#property indicator_width5 2
//--- Inputs
input group "Core"
input int ATR_Period = 14; // ATR calculation period
input int ATR_MA_Period = 50; // ATR moving average period
input int EMA_Period = 50; // EMA period for trend bias
input double Calm_Threshold = 0.5; // Below = calm regime
input double Quiet_Threshold = 0.8; // Below = quiet regime
input double Normal_High = 1.2; // Below = normal regime
input double Active_High = 2.0; // Below = active regime
input double Volatile_High = 3.0; // Below = volatile, above = extreme
input bool Block_Extreme = true; // Block all signals in extreme regime
input bool Block_Volatile = false; // Optionally block in volatile regime

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

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

6 volatility regimes with clear thresholds
Regime transition detection and logging
Master gate: blocks trading in EXTREME volatility
ATR ratio analysis (ATR / ATR_MA)
EA-readable regime buffer
Visual regime bands on chart
Adjustable parameters for other indicators

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

ATR_Period
الافتراضي: 14
ATR calculation period
ATR_MA_Period
الافتراضي: 50
ATR moving average period
Calm_Threshold
الافتراضي: 0.5
ATR ratio below = calm
Volatile_Threshold
الافتراضي: 2.0
ATR ratio above = volatile
Extreme_Threshold
الافتراضي: 3.0
ATR ratio above = extreme (no trade)

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

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

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

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

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

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

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

الأحداث الإخبارية ليست السبب الوحيد لقراءات EXTREME. الفجوة في الافتتاح، أو سحب السيولة المفاجئ خلال ساعات السوق الرقيقة، أو الانعكاس الحاد من مستوى رئيسي يمكن أن جميعها ترفع ATR دون حدث إخباري محدد. EXTREME هو قياس قائم على ATR، وليس فلترًا إخباريًا — إنه يلتقط قفزات التقلب بغض النظر عن السبب. إذا تم تشغيله بدون أخبار واضحة، فهذا يعني أن شيئًا في ديناميكيات السوق تغير، وكان حظر الصفقات هو القرار الصحيح.
آخر تحديث: ١١ يوليو ٢٠٢٦

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

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

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

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

المواصفات

الفئةFilter / Risk Management
الصعوبةBeginner
الإصدارv1.0
الإطاراتM1, M5, M15, M30, H1, H4
إعادة الرسملا
EAقابل

الأفضل لـ

Risk managementVolatility filteringAll timeframesEA signal gating
ATR Volatility Regime Classifier | مؤشر MT5 مجاني