P
PipsGrowth

Supertrend ATR Trend Envelope

#01 · Trend Following غير معاد الرسم EA Readable لوحة تنبيهات

The Supertrend ATR Trend Envelope indicator wraps price in upper and lower bands calculated from ATR (Average True Range) around the median price. Trend direction flips when price closes beyond the active band. Bands automatically widen during high volatility and tighten during calm markets, making this indicator self-adapting to changing conditions without manual parameter adjustment.

كيف يعمل

The indicator computes median price as (high + low) / 2, then adds/subtracts a multiple of ATR to create upper and lower bands. When price closes above the upper band, trend flips to bullish and the lower band becomes support. When price closes below the lower band, trend flips to bearish and the upper band becomes resistance. The Supertrend line follows the active support/resistance band.

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

  • Trend flips from BEAR to BULL on closed bar → potential BUY
  • Trend flips from BULL to BEAR on closed bar → potential SELL
  • All filters must pass: ATR regime, session, spread, cooldown
  • Confidence = base 60 + ATR regime bonus + trend strength bonus

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

  • TP Exit: Price reaches entry ± (TP_ATR_Mult × ATR)
  • Reversal Exit: Opposite trend flip occurs
  • Expiry Exit: Signal_Expiry_Bars passed without TP

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

  • ATR Regime: ATR > 3× ATR_MA → extreme, no trade
  • Session: Only signal during configured session hours
  • Spread: Spread > Max_Spread_Points → no signal
  • Cooldown: Last signal < Cooldown_Bars ago → no signal

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

أول 50 سطر من 1024
PG_01_Supertrend_TrendEnvelope.mq5
MQL5
//+------------------------------------------------------------------+
//| PipsGrowth_Supertrend_TrendEnvelope_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 6
// Plot 0: BUY Entry (up triangle, green)
#property indicator_label1 "BUY Entry"
#property indicator_type1 DRAW_COLOR_ARROW
#property indicator_color1 clrLime
#property indicator_width1 2
// Plot 1: SELL Entry (down triangle, red)
#property indicator_label2 "SELL Entry"
#property indicator_type2 DRAW_COLOR_ARROW
#property indicator_color2 clrRed
#property indicator_width2 2
// Plot 2: Exit Signal (color arrow: aqua=TP, orange=reversal, gray=expired)
#property indicator_label3 "Exit"
#property indicator_type3 DRAW_COLOR_ARROW
#property indicator_color3 clrAqua,clrOrange,clrGray
#property indicator_width3 2
// Plot 3: Bull Band
#property indicator_label4 "BullBand"
#property indicator_type4 DRAW_LINE
#property indicator_color4 clrLime
#property indicator_style4 STYLE_DOT
// Plot 4: Bear Band
#property indicator_label5 "BearBand"
#property indicator_type5 DRAW_LINE
#property indicator_color5 clrRed
#property indicator_style5 STYLE_DOT
// Plot 5: Supertrend (color line)
#property indicator_label6 "Supertrend"
#property indicator_type6 DRAW_COLOR_LINE
#property indicator_color6 clrLime,clrRed
#property indicator_width6 2
//--- Input Parameters
input group "Core"

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

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

Auto-adapting ATR-based bands
Trend flip detection on closed bars
Dynamic SL/TP calculation using ATR
Signal state machine (NONE → ENTRY → ACTIVE → EXITED)
Confidence scoring (0-100)
On-chart dashboard with filter status
Popup, push, email, and sound alerts

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

ATR_Period
الافتراضي: 10
ATR calculation period
ATR_Multiplier
الافتراضي: 3.0
Band width multiplier
SL_ATR_Mult
الافتراضي: 1.5
Stop loss in ATR multiples
TP_ATR_Mult
الافتراضي: 2.0
Take profit in ATR multiples
Signal_Expiry_Bars
الافتراضي: 20
Bars before signal expires
Min_Confidence
الافتراضي: 50
Minimum confidence to show entry
Session_Start_Hour
الافتراضي: 8
London open (GMT)
Session_End_Hour
الافتراضي: 17
NY close (GMT)
Max_Spread_Points
الافتراضي: 30
Max spread to allow signals
Cooldown_Bars
الافتراضي: 3
Bars between signals

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

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

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

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

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

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

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

Signal_Expiry_Bars (الافتراضي 20) يزيل علامة الإشارة بعد 20 شمعة إذا لم يتم الوصول إلى جني الأرباح. هذا ترتيب منزلي وليس وقف خسارة — إنه فقط يمسح الإشارات القديمة من الرسم البياني للحفاظ على نتائج الاختبار الخلفية نظيفة. إذا حدث هذا بشكل متكرر، فإن TP_ATR_Mult ضيق جدًا بالنسبة لمتوسط ATR المعتاد للزوج، أو أنك تتداول في سوق متقلب حيث نادرًا ما يتم الوصول إلى جني الأرباح. جرّب TP_ATR_Mult من 2.5 إلى 3.0 بدلاً من 2.0.
آخر تحديث: ١١ يوليو ٢٠٢٦

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

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

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

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

المواصفات

الفئةTrend Following
الصعوبةIntermediate
الإصدارv1.0
الإطاراتM1, M5, M15
إعادة الرسملا
EAقابل

الأفضل لـ

XAUUSD scalpingForex trend followingM1-M15 timeframesTrend identification
Supertrend ATR Trend Envelope | مؤشر MT5 مجاني