P
PipsGrowth
متابعة الاتجاهمفتوح المصدر - مجاني

Pipsgrowth EX16104 Trend — إكسبرت أدفايزر متابعة اتجاه

إكسبرت أدفايزر MT5 مفتوح المصدر · XAUUSD · M5، H1

Pipsgrowth EX16104 Trend — Expert Advisor that trades using four Hull V7 indicators with advanced exit strategies and multi-layer risk management. . إكسبرت أدفايزر MT5 مفتوح المصدر.

نظرة عامة

إكسبرت EX16104 من PipsGrowth يقدّم بنية غير مألوفة: مسار إشارات مبنيّ على مؤشرات Hull V7، وفوقه كومة من ثماني وحدات لإدارة المخاطر. معظم إكسبرتات تتبع الاتجاه تركّز الفلاتر على الدخول وتترك الجانب الخلفي رقيقاً؛ هذا الإكسبرت يفعل العكس. النتيجة استراتيجية بعدد صفقات قليل نسبياً، لكن كل صفقة تُدار من قبل ما يشبه دائرة صغيرة لمراقبة المخاطر تعمل على كل تيكة.

مسار الإشارة مبني على صنف CHullV7Calculator المخصّص. ثلاث نسخ نشطة من هذا الصنف في لوحة المدخلات: Hull1 وHull3 وHaps4. كل نسخة تحمل فترة وقاسماً وسعراً مطبقاً ومرشح ADX اختيارياً وحساسية الكشف عن التسطح. الحساب يقوم بعملية Hull V7 بالكامل داخلياً دون استدعاء iCustom. عند أي بار، يسحب سلسلة الأسعار للخلف بالقدر الكافي لبناء الحد الداخلي 2*WMA(period/divisor) - WMA(period)، ثم يملّسه بـ WMA بطول sqrt(period)، ويعيد 1 أو -1 أو 0 بحسب ما إذا كانت القيمة المملّسة ترتفع أو تنخفض أو ثابتة. اختبار التسطح هو ما يميّز هذا المؤشر عن Hull العادي: إذا كان ميل قيمة المؤشر عبر m_flatBars أقل من m_flatSensitivity * point، تعود النسخة بصفر وتمتنع عن التصويت. مرشح ADX الاختياري يعمل بالطريقة نفسها: ADX هادئ يجعل النسخة محايدة بدلاً من أن تدلي بصوت مشوش.

النسخ الثلاث تصوّت على كل بار مغلق (InpSignalBarShift=1 يمنع إعادة رسم البارات الحية). دالة HullConsensusAtShift تجمع أصوات الشراء وأصوات البيع، وتُصدر إشارة دخول شراء عندما longVotesg_minInitialAgreement (افتراضياً 1، مضبوط على 2 في الإصدار) وshortVotes = 0؛ والعكس صحيح للبيع. المعامل g_minAdditionalAgreement (افتراضياً 1) يخفض العتبة بمجرد فتح صفقة في نفس الاتجاه، فيسمح بتكديس صفقات إضافية باتفاق أضعف. دالة SignalIsStable تفرض الاستقرار بتمشيط InpStableBarsRequired (افتراضياً 2) بارات سابقة واشتراط بقاء نفس الاتفاقية عبرها كلها — انعكاس تيكة واحدة لا يكفي لفتح صفقة.

الإعدادات الافتراضية للنسخ الثلاث متعمّدة الاختلاف. Hull1 تستخدم فترة 65 وقاسم 16.5 وسعر مرجّح وإطار M1 — نسخة سريعة تستجيب للتحرّك الأول. Hull3 تستخدم فترة 48 وقاسم 6.2 وسعر متوسط وSMA وإطار D1 مع مرشح ADX(101) عند عتبة 84. Hull4 تستخدم فترة 185 وقاسم 13.4 وسعر عالي وLWMA وإطار D1 مع مرشح ADX(116) عند عتبة 192 (عتبة مرتفعة لا تنشط إلا في اتجاهات يومية قوية). المزج مقصود: إشارة M1 سريعة، متوسط يومي يرشّح التذبذب، وLWMA يومي بسعر High لا يؤكّد إلا حين يكون التحرّك قوياً بما يكفي لدفع السعر فوق غلاف LWMA. قاعدة 2 من 3 تعني أن مرتكزي الإطار اليومي يجب أن يتفقا مع إشارة M1 قبل أي دخول.

جانب الخروج هو ما يكسر قالب إكسبرتات الاتجاه المعتادة. بدلاً من الاعتماد على جني أرباح ثابت أو trailing stop واحد، يدير محرّك الخروج سبع استراتيجيات مستقلة: تباعد CCI (ExitCheckCCI)، ميل MACD (ExitCheckMACDSlope)، كسر القمة/القاع (ExitCheckSwing)، ستوكاستيك (ExitCheckStochastic)، معدّل التغيّر (ExitCheckROC)، تأكيد الأطر المتعددة (ExitCheckMTF)، والبارابوليك SAR (ExitCheckSAR). غلاف التوافق (ExitCheckAll) يطلب InpMinExitsAgreeProfit (افتراضياً 1) أصواتاً لإغلاق صفقة رابحة، وInpMinExitsAgreeLoss (افتراضياً 1) لإغلاق صفقة خاسرة. مفتاح InpAllowIndividualExits يعطّل التوافق ويسمح لأي استراتيجية منفردة بالإغلاق. تصويت Hull معاكس يضيف مسار خروج ثالث: اتفاق 3 من 3 يغلق أي صفقة رابحة بأكثر من 80 نقطة؛ اتفاق 4 من 4 يغلق حتى الخاسرة عندما يكون InpCloseOnOppositeEvenIfInLose مفعّلاً.

بالتوازي مع توافق الخروج تعمل وحدات إدارة الصفقات القياسية: CheckProfitScalingExit وCheckTimeBasedExit وCheckBreakEvenAndLock وCheckVolatilitySpikeExit. CheckSRExit يستخدم GetSwingHigh وGetSwingLow لإغلاق الصفقات التي تتعثّر عند دعم أو مقاومة. الـtrailing stop يشدّ وقف الخسارة بخطوات 20 نقطة بعد محفّز ربح 550 نقطة (InpTrailingTriggerPts/InpTrailingStepPts)؛ التعادل ينقل الوقف إلى entry+35 عند وصول الربح إلى 288 نقطة. قفل الربح الاختياري يدفع الوقف للأمام 20 نقطة كل 500 نقطة ربح جديدة — مفيد على XAUUSD حيث 500 نقطة حركة عادية في اليوم.

إدارة المخاطر هي الجزء الذي يستهلك أكبر عدد من المعاملات. نموذج حجم الصفقة افتراضياً MM_MODE_PERCENT_RISK عند 5.5% من الرصيد لكل صفقة، مع تقريب LOT_ROUND_NEAREST وتقييد ضمن حدود الوسيط. طبقة الإيقاف الدائم تراقب ثلاثة محفّزات: تراجع رصيد 20%، أو تراجع عملة 2,000$، أو 10 خسائر متتالية. طبقة الإيقاف المؤقت تعكس ذلك عند 10% / 1,000$ / 5 خسائر، ثم تفرض 60 دقيقة تهدئة قبل الاستئناف. طبقة خسارة اليوم تحدّ التراجع اليومي عند 500$ أو 5% من الرصيد (إعادة ضبط تلقائية في اليوم التالي). طبقة حماية التسلسل توقف الإكسبرت 12 ساعة إذا سجّل 5 صفقات متتالية في نفس الاتجاه، أو انخفضت نسبة الربح في آخر 10 صفقات تحت 40%. طبقة حماية التذبذب تستخدم عيّنة 20 باراً لاكتشاف ما إذا كان التذبذب الحالي أكثر من 2.5× المتوسط فتوقف الإدخالات، مع تضخيم اختياري لتحمل الانزلاق حتى 3×. طبقة تقييد التعرّض تحدّ القيمة الإجمالية للصفقات عند 15% منEquity وتفرض عتبة 0.95 لنسبة equity/balance. طبقة وضع التعافي تنشط عند تراجع 10% وتُنصّف حجم اللوت ولا تخرج من التعافي إلا بعد 3 صفقات رابحة. طبقة مراقبة الاتصال تُعيد محاولة الأوامر الفاشلة 3 مرات بفاصل ثانية، بميزانية تنفيذ ثانية واحدة؛ إن تعذّر الاتصال تُغلق الصفقات المفتوحة قسراً.

مراقب الارتباط (ConfigureCorrelationMonitor / CorrelationMonitorHandlePositions) يتابع الارتباط اللحظي بين XAUUSD و7 أزواج رئيسية — USDJPY افتراضياً مع EURUSD وGBPUSD وAUDUSD وNZDUSD وUSDCAD وUSDCHF القابلة للتفعيل — على إطار H1 بنظرة خلفية 35 باراً. يُفرض ارتباط مطلق أدنى 3.975 (القيم مُقياسة لا Pearson خام)، وانبعاث 0.25 عبر نافذة النظر يستحث إما حظر دخول أو إغلاق قسري بحسب مفتاح InpCorrelationClosePositions. فوق ذلك يضيف نظام EventPause نوافذ أخبار مدفوعة بملف CSV، مع كشف الجمعة الأولى لـNFP وأوقات lead/lag قابلة للضبط (15 دقيقة افتراضياً) ومفتاح رمز افتراضي USDJPY — غيّر اسم الملف والمفتاح لمتابعة سلسلة أحداث مختلفة. حارس الجمعة الأولى يعمل أيضاً باستقلالية فيوقف الإدخالات من 8:30 بتوقيت الوسيط ±30 دقيقة حول صدور NFP.

كثافة شبكة الأمان تأتي بتكلفة إعداد. المصدر يعرّف 480 معامل إدخال عبر 66 مجموعة. أغلب فلاتر التأكيد مطفأة افتراضياً (InpEnableRsiConfirmation هو الوحيد المفعّل بجانب تصويت Hull)، فيتعامل المتداول العملي مع أقسام إدارة الصفقات والمخاطر وHull — نحو 80 إلى 100 معامل نشط. وحدة لوحة المعلومات (CDashboardGuard) ترسم لوحة حالة تتحدّث على كل تيكة لعرض الفلتر الحاجب الحالي، مجموع تصويت Hull المباشر، هامش التوافق، وسلسلة حالة توقف الأحداث.

في الباك تيست، يعكس النموذج ما تتوقعه من إعداد 5.5% مخاطرة للصفقة و1:10 ربح/خسارة مع توافق 2 من 3 من Hull ومحرّك مخاطر من ثماني طبقات. تكرار الصفقات منخفض — مرتكزا D1 نادراً ما يتفقان على رسوم M5 السريعة، فينتظر الإكسبرت توافقاً نظيفاً متعدد الأطر قبل الإطلاق. منحنى Equity يميل إلى الدرَج مع سحب حادّ عرضي عند انفجار قاطع 5 أو 10 خسائر. نسبة 5.5% مخاطرة للصفقة مرتفعة، وأرصدة 1,000$+ تمنح طبقات المخاطر الثماني مساحة للعمل دون تفعيل الإيقاف الدائم باكراً، فيما تعامل طبقة التعرّض الأرصدة دون 200$ كغير قابلة للتداول.

تفاصيل الاستراتيجية

صنف CHullV7Calculator يحسب قيمة Hull V7 بالكامل داخلياً من مدخلات WMA(period/divisor) وWMA(period) الأولية، ويعيد لكل نسخة 1 (شراء) أو -1 (بيع) أو 0 (محايد)، ويضمّ مرشح ADX واختبار ميل التسطح ضمن استدعاء GetDirection(shift) نفسه. HullConsensusAtShift تجمع الأصوات، وg_minInitialAgreement (افتراضياً 1، مضبوط على 2) يتحكم في عتبة الدخول، وSignalIsStable تمشط InpStableBarsRequired بارات سابقة لرفض انعكاسات تيكة واحدة. جانب الخروج تتولاه CheckProfitScalingExit وCheckTimeBasedExit وCheckMomentumExit وCheckBreakEvenAndLock وCheckVolatilitySpikeExit وCheckSRExit وتوافق ExitCheckAll السباعي. CorrelationMonitorHandlePositions يتفاعل عندما ينحرف XAUUSD عن 7 أزواج رئيسية؛ ثماني وحدات مخاطر — الإيقاف الدائم والإيقاف المؤقت وحد خسارة اليوم وحماية التسلسل وحماية التذبذب وتقييد التعرّض ووضع التعافي ومراقب الاتصال — تعمل جميعها كحواجز عدم-تدخل على كل تيكة.

إشارة الدخول

يُفعَّل دخول الشراء عندما تصوّت نسختان على الأقل من نسخ Hull V7 الثلاث النشطة (Hull1 على M1 وHull3 على D1 وHull4 على D1) لصالح الشراء ولا تصوّت أيّ منهن لصالح البيع، مع بقاء نفس التوافق مستقراً عبر آخر باراتين مغلقتين (InpSignalBarShift=1 وInpStableBarsRequired=2). بعد فتح صفقة في الاتجاه نفسه، تنخفض العتبة إلى 1 من 3 للإدخالات الإضافية (g_minAdditionalAgreement=1). يمكن لمحاذاة الاتجاه متعدد الأطر وADX وRSI(41) وأربعة عشر فلتراً آخر أن تلغي كلٌّ منها الإدخال باستقلالية؛ فقط تصويت Hull وتأكيد RSI مفعّلان في الإعداد الافتراضي.

إشارة الخروج

يتحكم في الخروج محرّك توافق من 7 استراتيجيات: تباعد CCI وميل MACD وكسر القمة/القاع وستوكاستيك وROC وMTF والبارابوليك SAR، يطلب صوتاً واحداً على الأقل (افتراضي InpMinExitsAgreeProfit=1) قبل إغلاق صفقة رابحة ونفس العدد للخاسرة. يضيف تصويت Hull معاكس مساراً ثانياً: اتفاق 3 من 3 مغلق أي صفقة رابحة بأكثر من 80 نقطة، بينما اتفاق 4 من 4 يغلق الخاسرة عندما يكون InpCloseOnOppositeEvenIfInLose مفعّلاً. CheckSRExit يغلق الصفقات التي تتعثّر عند دعم أو مقاومة؛ الخروج المعتمد على الوقت وحماية نهاية الأسبوع يعملان بالتوازي.

وقف الخسارة

وقف الخسارة الابتدائي 200 نقطة من الدخول (InpStopLossPoints=200.0)، يُشدّد إلى entry+35 عند وصول الربح إلى 288 نقطة (InpBreakEvenTrigger=288 وInpBreakEvenOffset=35). الـtrailing stop يشدّ الوقف بخطوات 20 نقطة بعد محفّز ربح 550 نقطة (InpTrailingTriggerPts=550 وInpTrailingStepPts=20). وضع قفل الربح الاختياري يدفع الوقف للأمام 20 نقطة كل 500 نقطة ربح جديدة.

جني الأرباح

جني الأرباح الابتدائي 2000 نقطة (InpTakeProfitPoints=2000.0)، بنسبة مخاطرة/مكافأة 1:10 مقابل وقف 200 نقطة. فلسفة الإكسبرت القائمة على الـtrailing stop تسمح للصفقات الرابحة بتجاوز TP بكثير؛ توافق الخروج من 7 استراتيجيات وإشارات Hull المعاكسة عادةً تغلق الصفقة قبل الوصول إلى جني الأرباح الأصلي.

الأنسب لـ

الحد الأدنى الموصى به للرصيد 100$ على وسيط XAUUSD بفارق سعر منخفض، بحجم يناسب مستوى المخاطرة MEDIUM؛ مخاطرة 5.5% لكل صفقة ومحرّك المخاطر من 8 طبقات يفترضان أرصدة أعلى من 1,000$ لإعطاء وحدتي الإيقاف المؤقت والدائم مساحة للعمل. الأنسب على الرسوم البيانية M5 وH1 حيث يمكن لنسخة Hull1 على M1 أن تقترن مع مرتكزي Hull3 وHull4 على D1 لتحقيق محاذاة متعددة الأطر. تنفيذ ECN أو RAW-SPREAD مهم لأن حارس التذبذب في الإكسبرت يراقب الفارق اللحظي، وInpEnableMarginGuard عند 240% يحظر الإدخالات حين يكون هامش الحساب ضيّقاً.

منطق الاستراتيجية

Pipsgrowth EX16104 Trend — تحليل منطق الاستراتيجية (من كود .mq5)

العائلة: Trend الماجيك: 22216104 الإصدار: 2.00

الوصف: Expert Advisor that trades using four Hull V7 indicators with advanced exit strategies and multi-layer risk management. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

المؤشرات:

  • tfRsiHandle
  • tfEmaFastHandle
  • tfEmaSlowHandle

الدوال الرئيسية:

  • PrepareTradeComment()
  • ExitShouldClosePosition()
  • ExitGetPositionProfitPoints()
  • ExitSortPositionsByAge()
  • ExitFindRecentPivots()
  • ExitDetectCCIDivergence()
  • ExitCalculateROC()
  • ExitGetSwingHighLow()
  • ExitDeinit()
  • ExitInit()
الرمز الزائف (Pseudocode)
// Pipsgrowth EX16104 Trend — Execution Flow (from source analysis)
// Family: Trend
// Expert Advisor that trades using four Hull V7 indicators with advanced exit strategies and multi-layer risk management. 12 layers: REGIME, SIGNAL, ENTRY, CONFIRM, NO-TRADE, CAPITAL CAP, RISK, SIZING, MANAGE, EXIT, SCALING, OnTester

ON_INIT:
    Create indicator handles: tfRsiHandle, tfEmaFastHandle, tfEmaSlowHandle
    Initialize state variables
    Detect broker GMT offset

ON_TICK:
    1. Refresh indicator buffers (closed-bar shift=1)
    2. Manage existing positions:
       - Break-even check
       - ATR trailing stop
       - Profit lock ratchet
       - Time-based exit
       - Opposite-signal exit
    3. If new bar:
       a. ClassifyRegime() — ADX/ATR/BB regime detection
       b. NoTradeGate() checks:
          - Market open + session filter
          - Spread limit
          - Cooldown after loss
          - Consecutive loss limit
          - Kill switch
          - Max drawdown
          - Max concurrent positions
          - Daily/weekly loss limits
       c. GenerateSignal() — strategy-specific entry logic
       d. CheckConfirm() — HTF alignment + R:R + ADX minimum
       e. Calculate position size from risk %
       f. Execute with retry logic
       g. Mark bar to prevent duplicates

ON_TESTER:
    Custom fitness = weighted(RecoveryFactor, ROI, ProfitFactor, TradeCount, Sharpe, Drawdown)

ملف التحسين

الوسطاء المُحسّنون:
ExnessIC Markets
الرموز المُحسّنة:
XAUUSD
الأطر الزمنية المُحسّنة:
M5H1

كيفية تثبيت الإكسبرت على MT5

  1. 1حمّل ملف .mq5 بالضغط على زر التحميل أعلاه
  2. 2افتح برنامج MetaTrader 5 على حاسوبك
  3. 3من القائمة العلوية اختر File → Open Data Folder
  4. 4انتقل إلى مجلد MQL5 → Experts والصق الملف هناك
  5. 5في MT5، انقر بالزر الأيمن على Expert Advisors في لوحة Navigator → Refresh
  6. 6اسحب الإكسبرت على رسم H4 أو اليومي للحصول على أفضل النتائج
  7. 7حدد فترات EMA وعتبة ADX وحجم اللوت في نافذة الإعدادات
  8. 8فعّل Allow Algo Trading واضغط OK

معاملات الإكسبرت

المعاملالافتراضيالوصف
InpLots0.10Fixed lot size (0.01,0.01,50.0)
InpSlippagePoints20Max slippage (points) (0,1,100)
InpMagicNumber22216104Magic number (1,1,99999999)
InpTradeComment"Psgrowth.com Expert_16104"Trade comment for new positions
InpMoneyManagementModeMM_MODE_PERCENT_RISKMoney management mode
InpRiskPerTradePercent5.5Risk per trade (% of balance) (0.1,0.1,10.0)
InpLotRoundingModeLOT_ROUND_NEARESTLot rounding mode
InpStopLossPoints200.0Initial stop loss (points) (10.0,1.0,5000.0)
InpTakeProfitPoints2000.0Initial take profit (points) (10.0,1.0,10000.0)
InpEnableMarginGuardtrueEnforce minimum margin level before new trades
InpMinMarginLevelPerc240.0Minimum margin level (%) (100.0,1.0,1000.0)
InpEnableFreeMarginGuardfalseEnforce minimum free margin before new trades
InpMinFreeMarginCurrency0.0Minimum free margin (account currency)
InpEnableTrailingStoptrueMaster toggle for trailing stop management
InpTrailingTriggerPts550.0Trailing stop trigger (points) (5.0,1.0,500.0)
InpTrailingStepPts20.0Trailing stop step (points) (10.0,1.0,2000.0)
InpEnableBreakEventrueMove SL to break-even
InpBreakEvenTrigger288.0Profit trigger (points) (5.0,1.0,500.0)
InpBreakEvenOffset35.0Offset from entry (points) (0.0,1.0,100.0)
InpEnableProfitLockfalseLock profits
InpProfitLockIncrement500.0Lock every X points (10.0,1.0,500.0)
InpProfitLockStep20.0Distance from current price (1.0,1.0,200.0)
InpEnableProfitGatetrueRequire existing trades be in profit
InpProfitGatePoints10.0Minimum profit (points) per trade (1.0,1.0,500.0)
InpMaxOpenPositions0Maximum open positions (0=unlimited) (0,1,100)
InpEnablePermanentStopfalseEnable permanent stop (hard shutdown)
InpPermanentStopUseDrawdownPercenttrueUse drawdown % threshold for permanent stop
InpPermanentStopDrawdownPercent20.0Max drawdown % to trigger permanent stop (1.0,0.5,50.0)
InpPermanentStopUseDrawdownCurrencytrueUse drawdown currency threshold for permanent stop
InpPermanentStopDrawdownCurrency2000.0Max drawdown $ to trigger permanent stop (10.0,10.0,10000.0)
InpPermanentStopUseConsecutiveLossestrueUse consecutive loss threshold for permanent stop
InpPermanentStopConsecutiveLosses10Max consecutive losses to trigger permanent stop (1,1,20)
InpPermanentStopCloseAlltrueClose all positions on permanent stop
InpPermanentStopNotifytrueSend alert on permanent stop
InpEnableTemporaryPausefalseEnable temporary pause (recoverable)
InpPauseUseDrawdownPercenttrueUse drawdown % trigger for temporary pause
InpPauseDrawdownPercent10.0Drawdown % to trigger pause (1.0,0.5,50.0)
InpPauseUseDrawdownCurrencytrueUse drawdown currency trigger for temporary pause
InpPauseDrawdownCurrency1000.0Drawdown $ to trigger pause (10.0,10.0,10000.0)
InpPauseUseConsecutiveLossestrueUse consecutive loss trigger for temporary pause
InpPauseConsecutiveLosses5Consecutive losses to trigger pause (1,1,20)
InpPauseUseCooldowntrueApply cooldown timer for temporary pause
InpPauseCooldownMinutes60Cooldown period before auto-resume (0,10,1440)
InpPauseClosePositionstrueClose positions when pause triggers
InpPauseNotifytrueSend alert when pause triggers
InpEnableDailyLimitfalseEnable daily loss limit
InpDailyLimitUseCurrencytrueUse currency-based daily loss limit
InpDailyLossLimitCurrency500.0Max daily loss in account currency (50.0,10.0,10000.0)
InpDailyLimitUsePercenttrueUse percentage-based daily loss limit
InpDailyLossLimitPercent5.0Max daily loss as % of balance (0.5,0.1,25.0)
InpDailyLimitResumeNextDaytrueAuto-resume at next market day
InpDailyLimitNotifytrueSend alert when daily limit triggers
InpEnableSequenceProtectionfalseEnable trade sequence monitoring
InpSequenceUseConsecutiveSameSidetrueUse consecutive same-side trades trigger
InpMaxConsecutiveSameSide5Max consecutive trades in same direction (3,1,15)
InpSequenceUseWinRatetrueUse win-rate trigger
InpRequiredWinRatePercent40.0Minimum required win rate % (25.0,1.0,75.0)
InpWinRateMonitoringTrades10Trades to monitor for win rate (5,5,50)
InpPauseOnLowWinRatetruePause trading on low win rate
InpPauseDurationHours12Pause duration in hours (1,1,48)
InpEnableVolatilityGuardfalsePause during extreme volatility
InpVolatilityMultiplier2.5Volatility threshold vs average (1.5,0.1,5.0)
InpVolatilitySamplePeriod20Bars to measure volatility (10,5,50)
InpVolatilityAdaptSlippagetrueAdjust max slippage based on volatility
InpVolatilityMaxSlippageFactor3.0Maximum slippage multiplier (1.5,1.0,10.0)
InpEnableExposureLimitfalseLimit total risk exposure
InpExposureUsePositionPercenttrueUse exposure percentage limit
InpMaxPositionValuePercent15.0Max position size % of equity (5.0,1.0,50.0)
InpExposureUseEquityRatiofalseUse equity/balance ratio floor
InpEquityToBalanceMinRatio0.95Min equity/balance ratio (0.80,0.50,1.0)
InpReducePositionSizeOnDrawdownfalseReduce position sizing during drawdown
InpPositionSizeReduceFactor0.5Position size reduction factor (0.5,0.1,0.9)
InpEnableRecoveryModefalseUse recovery after drawdown
InpRecoveryStartPercent10.0Drawdown % to activate recovery (5.0,1.0,25.0)
InpRecoveryLotMultiplier0.5Position size reduction factor (0.5,0.1,1.0)
InpRecoverySuccessTrades3Profitable trades to exit recovery (2,1,10)
InpRecoveryReduceRisktrueUse tighter stops in recovery mode
InpEnableConnectionMonitorfalseMonitor connection stability
InpMaxExecutionTimeMS1000Max execution time in ms (500,100,5000)
InpMaxOrderRetries3Max order retries on failure (2,1,10)
InpOrderRetryDelayMS1000Delay between retries in ms (500,100,5000)
InpForceCloseOnTimeouttrueClose positions on persistent timeouts
InpEnableDebugTreefalseEnable tree-style debug logging
InpDebugTreeIncludeTimestamptrueInclude timestamps in debug output
InpmainSignal"=== Main Signal ==="Section header for inputs
InpUseExitConsensustrueUse coordinated exit consensus
InpEnableProfitConsensustrueRequire consensus for profitable exits
InpMinExitsAgreeProfit1Min exits agreeing to close profitable (1,1,7)
InpEnableLossConsensustrueRequire agreement for loss exits
InpMinExitsAgreeLoss1Min exits agreeing to close losing (1,1,7)
InpExitConsensusProfitThreshold45.0Min profit (points) for consensus exit (0.0,1.0,100.0)
InpAllowIndividualExitsfalseAllow individual strategies to exit independently
InpIndividualExitsProfitOnlyfalseIndividual exits require profit
InpIndividualExitMinProfit30.0Min profit for individual exit (0.0,1.0,100.0)
InpSignalBarShift1Signal bar shift (0=current,1=closed)
InpMinIndicatorsAgreeForInitialTrades2Minimum Hulls agreeing for initial entries (1,1,4)
InpMinIndicatorsAgreeForAdditonalTrades1Minimum Hulls agreeing for additional entries (1,1,4)
InpRequireStableSignaltrueRequire consensus to persist
InpStableBarsRequired2Consecutive bars with same consensus (1,1,10)
Hull1_EnabledtrueEnable Hull 1
Hull1_Period65Hull period (2,1,600)
Hull1_Divisor16.5Hull divisor ("speed")
Hull1_Price7Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // Applied price
Hull1_Timeframe1Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Evaluation timeframe (PERIOD_CURRENT=chart)
Hull3_EnabledtrueEnable Hull 3
Hull3_Period48Hull Period (9,1,600)
Hull3_Divisor6.2Hull Divisor (2.0,0.1,25.0)
Hull3_Price5Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull3_Timeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_FlatSensitivity2.5Flat Sensitivity (1.0,0.5,40.0)
Hull3_FlatBars1Flat Bars (1,1,20)
Hull3_AdxTimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull3_AdxPeriod101ADX Period (7,1,100)
Hull3_AdxThreshold84.0ADX Threshold (20.0,0.5,80.0)
Hull3_MomentumLookback40Momentum Lookback (3,1,50)
Hull3_MomentumPoints12.0Momentum Points (5.0,0.5,100.0)
Hull4_EnabledtrueEnable Hull 4
Hull4_Period185Hull Period (9,1,1000)
Hull4_Divisor13.4Hull Divisor (1.0,0.1,40.0)
Hull4_Price3Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
Hull4_Timeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_FlatSensitivity6.0Flat Sensitivity (1.0,0.5,40.0)
Hull4_FlatBars7Flat Bars (1,1,20)
Hull4_AdxTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
Hull4_AdxPeriod116ADX Period (7,1,50)
Hull4_AdxThreshold192.0ADX Threshold (10.0,0.5,60.0)
Hull4_MomentumLookback20Momentum Lookback (3,1,50)
Hull4_MomentumPoints41.0Momentum Points (1.0,0.5,40.0)
InpCloseOnOppositetrueClose trades on opposite agreement if in profit
InpMinIndicatorsAgreeCloseProfit3Minimum Hulls to close in profit (1,1,4)
InpCloseProfitPoints80.0Minimum profit (points) to close on opposite (0.0,1.0,200.0)
InpCloseOnOppositeEvenIfInLosetrueClose trades on opposite agreement even if losing
InpMinIndicatorsAgreeCloseLoss4Minimum Hulls to close even if losing (1,1,4)
InpFilters"=== Start of Filters ==="Section header for inputs
InpEnableRsiConfirmationtrueRequire RSI confirmation for entries
InpRsiTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpRsiPeriod41RSI Period (5,1,30)
InpRsiPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted)
InpRsiBuyMin36.0RSI Buy Min (0.0,1.0,50.0)
InpRsiBuyMax70.0RSI Buy Max (50.0,1.0,80.0)
InpRsiSellMin40.0RSI Sell Min (20.0,1.0,50.0)
InpRsiSellMax53.0RSI Sell Max (70.0,1.0,100.0)
InpEnableHtfRsiFilterfalseEnable HTF RSI confirmation filter
InpHtfRsiUseForInitialTradestrueUse for initial trade entries
InpHtfRsiUseForAdditionalTradesfalseUse for additional trades (same direction)
InpHtfRsiTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // HTF RSI timeframe
InpHtfRsiPeriod34HTF RSI Period (5,1,200)
InpHtfRsiPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // HTF RSI applied price
InpHtfRsiBuyMin35.0HTF RSI Buy Min (0.0,1.0,50.0)
InpHtfRsiBuyMax70.0HTF RSI Buy Max (50.0,1.0,80.0)
InpHtfRsiSellMin30.0HTF RSI Sell Min (20.0,1.0,50.0)
InpHtfRsiSellMax60.0HTF RSI Sell Max (70.0,1.0,100.0)
InpEnableMacdFilterfalseEnable MACD confirmation filter
InpMacdUseForInitialTradestrueUse for initial trade entries
InpMacdUseForAdditionalTradesfalseUse for additional trades
InpMacdTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // MACD timeframe
InpMacdFastEma12MACD Fast EMA (5,1,50)
InpMacdSlowEma26MACD Slow EMA (10,1,100)
InpMacdSignalPeriod9MACD Signal Period (5,1,30)
InpMacdPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MACD Applied Price
InpMacdRequireHistogramPositivetrueHistogram must be positive for BUY
InpMacdRequireMainAboveSignaltrueMain line must be above signal for BUY
InpMacdRequireZeroCrossfalseRequire recent zero-line cross
InpMacdCrossBarsLookback5Max bars since zero cross (1,1,20)
InpMacdRequireMinHistogramfalseRequire minimum histogram strength
InpMacdMinHistogramValue0.0001Min histogram absolute value (0.0,0.00001,0.01)
InpMacdRequireIncreasingMomentumfalseHistogram must be growing
InpMacdMomentumBarsCheck2Bars to check momentum growth (1,1,5)
InpEnableHTFEmaFilterfalseEnable HTF EMA confirmation filter
InpHTFEma_UseForInitialTradestrueUse for initial trade entries
InpHTFEma_UseForAdditionalTradesfalseUse for additional trades (same direction)
InpHTFEma_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // HTF EMA timeframe
InpHTFEma_FastPeriod21Fast EMA period (5,1,200)
InpHTFEma_SlowPeriod50Slow EMA period (10,1,500)
InpHTFEma_Price1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // EMA applied price
InpHTFEma_ModeHTF_EMA_ALL_ALIGNEDEMA confirmation mode
InpHTFEma_CrossoverBars5Max bars since crossover (1,1,20)
InpHTFEma_RequireMinSeparationfalseRequire minimum EMA separation
InpHTFEma_MinSeparationPoints10.0Min separation in points (1.0,1.0,500.0)
InpHTFEma_RequirePriceDistancefalseRequire price distance from EMAs
InpHTFEma_MinPriceDistancePoints5.0Min distance in points (1.0,1.0,200.0)
InpHTFEma_RequireSlopefalseRequire EMA slope alignment
InpHTFEma_SlopeLookback3Bars for slope calculation (2,1,10)
InpHTFEma_MinSlopePoints1.0Min slope in points (0.1,0.1,50.0)
InpHTFEma_WaitForPullbackfalseWait for price pullback to fast EMA
InpHTFEma_PullbackTolerancePoints20.0Pullback tolerance in points (5.0,1.0,100.0)
InpHTFEma_UseAdaptiveThresholdsfalseUse ATR-based adaptive thresholds
InpHTFEma_AdaptiveAtrPeriod14ATR period for adaptive mode (5,1,50)
InpHTFEma_AdaptiveMultiplier1.5Multiplier for adaptive thresholds (0.5,0.1,5.0)
InpEnablePriceActionFilterfalseEnable price action confirmation
InpPA_UseForInitialTradestrueUse for initial trade entries
InpPA_UseForAdditionalTradesfalseUse for additional trades (same direction)
InpPA_RequireEngulfingfalseRequire engulfing candle pattern
InpPA_RequirePinBarfalseRequire pin bar/rejection pattern
InpPA_PinBarWickRatio2.0Min wick/body ratio for pin bar (1.5,0.5,5.0)
InpPA_RequireInsideBarfalseRequire inside bar breakout
InpPA_AllowAnyPatterntrueAccept trade if ANY pattern matches (vs ALL)
InpPA_RequireBodySizetrueRequire minimum candle body
InpPA_MinBodyPercent50.0Min body % of total range (30.0,5.0,90.0)
InpPA_BlockDojitrueBlock doji/spinning top patterns
InpPA_DojiThreshold30.0Max body % for doji (10.0,5.0,40.0)
InpPA_RequireCloseInDirectiontrueClose must be in trade direction
InpPA_MinClosePositionPercent60.0Min close position in range % (50.0,10.0,90.0)
InpPA_RequireMinBarSizetrueRequire minimum bar size
InpPA_MinBarSizePoints8Minimum bar size in points (2,1,50)
InpPA_UseATRForBarSizetrueUse ATR-based dynamic sizing
InpPA_MinATRMultiplier0.3Min bar size as ATR multiple (0.1,0.1,2.0)
InpPA_ATRPeriod14ATR period for bar sizing (10,5,50)
InpPA_RequireConsecutiveBarsfalseRequire consecutive bars in direction
InpPA_ConsecutiveCount2Number of consecutive bars (2,1,5)
InpPA_RequireHigherClosetrueBUY: close > prev close | SELL: close < prev
InpPA_RequireHigherHighfalseBUY: high > prev high | SELL: low < prev low
InpPA_LimitWickSizetrueLimit opposing wick size
InpPA_MaxOpposingWickPercent40.0Max opposing wick % of range (20.0,10.0,70.0)
InpPA_RequireStrongClosetrueClose in top/bottom third of bar
InpPA_StrongClosePercent70.0Min % threshold for strong close (60.0,50.0,90.0)
InpEnableMTFTrendFilterfalseEnable MTF trend alignment
InpMTFTrend_UseForInitialTradestrueUse for initial trade entries
InpMTFTrend_UseForAdditionalTradesfalseUse for additional trades
InpMTFTrend_Timeframe18Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Trend timeframe 1 (intermediate)
InpMTFTrend_Timeframe29Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Trend timeframe 2 (higher)
InpMTFTrend_Timeframe310Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Trend timeframe 3 (daily)
InpMTFTrend_MA1Period20TF1 MA period (10,1,200)
InpMTFTrend_MA2Period50TF2 MA period (10,1,200)
InpMTFTrend_MA3Period100TF3 MA period (10,1,200)
InpMTFTrend_MAMethodMODE_EMAMA calculation method
InpMTFTrend_MAPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MA applied price
InpMTFTrend_MinAligned2Min timeframes aligned (1,1,3)
InpMTFTrend_RequirePriceAbovetruePrice must be above/below all MAs
InpMTFTrend_RequireSlopefalseRequire MA slope in direction
InpMTFTrend_SlopeLookback3Bars for slope calculation (2,1,10)
InpEnableAdxTrendFilterfalseEnable ADX trend filter
InpAdxTrend_UseForInitialTradestrueUse for initial trade entries
InpAdxTrend_UseForAdditionalTradesfalseUse for additional trades
InpAdxTrend_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ADX timeframe
InpAdxTrend_Period14ADX period (7,1,50)
InpAdxTrend_MinStrength25.0Min ADX value for trend (15.0,5.0,50.0)
InpAdxTrend_RequireDIAlignmenttrueRequire DI+/DI- directional confirmation
InpAdxTrend_MinDISeparation5.0Min DI+/DI- separation (0.0,1.0,20.0)
InpAdxTrend_RequireRisingfalseRequire ADX to be rising (strengthening trend)
InpAdxTrend_RisingBars2Bars to confirm ADX rise (1,1,5)
InpEnableSupertrendFilterfalseEnable Supertrend filter
InpSupertrend_UseForInitialTradestrueUse for initial trade entries
InpSupertrend_UseForAdditionalTradesfalseUse for additional trades
InpSupertrend_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Supertrend timeframe
InpSupertrend_Period10ATR period (7,1,50)
InpSupertrend_Multiplier3.0ATR multiplier (1.0,0.5,10.0)
InpSupertrend_RequireConsecutiveBarsfalseRequire X bars in same trend state
InpSupertrend_ConsecutiveCount2Consecutive bars required (1,1,5)
InpEnableIchimokuFilterfalseEnable Ichimoku filter
InpIchimoku_UseForInitialTradestrueUse for initial trade entries
InpIchimoku_UseForAdditionalTradesfalseUse for additional trades
InpIchimoku_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Ichimoku timeframe
InpIchimoku_TenkanPeriod9Tenkan-sen period (5,1,20)
InpIchimoku_KijunPeriod26Kijun-sen period (10,1,50)
InpIchimoku_SenkouPeriodB52Senkou Span B period (20,1,100)
InpIchimoku_RequireAboveCloudtrueBUY: price above cloud, SELL: below
InpIchimoku_RequireTKCrossfalseRequire Tenkan/Kijun crossover
InpIchimoku_CrossLookback5Max bars since TK cross (1,1,20)
InpIchimoku_RequireChikouCleartrueChikou must be clear (not in price)
InpEnableVwapFilterfalseEnable VWAP filter
InpVwap_UseForInitialTradestrueUse for initial trade entries
InpVwap_UseForAdditionalTradesfalseUse for additional trades
InpVwap_Timeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // VWAP timeframe
InpVwap_Period20VWAP period (10,1,100)
InpVwap_RequirePriceAbovetrueBUY: price > VWAP, SELL: price < VWAP
InpVwap_RequireSlopetrueVWAP must slope in trade direction
InpVwap_SlopeLookback3Bars for slope calculation (2,1,10)
InpVwap_RequireMinDistancefalseRequire min distance from VWAP
InpVwap_MinDistancePoints5.0Min distance in points (1.0,1.0,100.0)
InpEnableCorrelationMonitortrueEnable correlation monitoring
InpCorrelationBlockEntriestrueBlock new entries on correlation breakdown
InpCorrelationClosePositionsfalseClose positions when correlation breaks down
InpCorrelationTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Correlation timeframe
InpCorrelationLookback35Bars to evaluate correlation (10,1,500)
InpCorrelationMinThreshold3.975Minimum absolute correlation allowed (0.1,0.01,0.99)
InpCorrelationDivergenceTrigger0.25Minimum change to flag breakdown (0.05,0.01,1.0)
InpCorrelationConfirmBars1Consecutive bars required to confirm breakdown (1,1,10)
InpCorrelationSymbolSuffix"m"Broker symbol suffix (auto-appended)
InpCorrWatch_EURUSDfalseMonitor EURUSD correlation
InpCorrWatch_GBPUSDfalseMonitor GBPUSD correlation
InpCorrWatch_AUDUSDfalseMonitor AUDUSD correlation
InpCorrWatch_NZDUSDfalseMonitor NZDUSD correlation
InpCorrWatch_USDJPYtrueMonitor USDJPY correlation
InpCorrWatch_USDCADfalseMonitor USDCAD correlation
InpCorrWatch_USDCHFtrueMonitor USDCHF correlation
InpCorrWatch_XAUUSDfalseMonitor XAUUSD correlation
InpEnableBarRangeFilterfalseRequire minimum average bar range
InpBarRangeLookback5Number of bars to average (2,1,50)
InpMinBarRangePoints50.0Minimum average range (points) (1.0,1.0,1000.0)
InpEnableNFPFiltertrueBlock trading on first Friday (NFP)
InpNFPStartHour8NFP release hour (broker time) (0,1,23)
InpNFPStartMinute30NFP release minute (0,1,59)
InpNFPAvoidMinutesBefore30Stop trading X min before NFP (5,1,120)
InpNFPAvoidMinutesAfter30Resume trading X min after NFP (5,1,120)
InpNFPClosePositionsfalseClose positions before NFP
InpNFPCloseMinutesBefore10Close X min before NFP (1,1,60)
InpNFPCloseProfitOnlytrueOnly close profitable positions
InpEnableEventPauseFilterfalseEnable CSV-driven event blackout
InpEventPauseCsvFile"USDJPY.csv"CSV filename located in MQL5\Files
InpEventPauseReloadMinutes60Reload CSV every N minutes (0=load once)
InpEventPauseLeadMinutes15Start blocking N minutes before pause window
InpEventPauseLagMinutes15Continue blocking N minutes after pause window
InpEventPauseDefaultYear0Override year if CSV omits it (0=auto)
InpEventPauseSymbolKey"USDJPY"Symbol keyword to match events
InpEnableAtrFiltertrueRequire minimum ATR
InpAtrTimeframe6Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpAtrPeriod60ATR period (5,1,50)
InpAtrAveragePeriod185ATR average period (10,1,200)
InpAtrMultiplierMin0.69ATR must be >= average*multiplier (0.5,0.1,5.0)
InpEnableSpreadFiltertrueBlock trades during wide spreads
InpMaxSpreadPoints20.0Maximum allowed spread (points) (1.0,1.0,200.0)
InpEnableVolumeFiltertrueEnable volume filter for entries
InpVolumeTypeVOLUME_TICKVolume type to analyze
InpVolumeTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Volume data timeframe
InpVolumeThreshold0Minimum volume threshold (0=disabled)
InpUseVolumeAveragetrueCompare to average volume
InpVolumeAvgPeriod10Volume average period (5,1,100)
InpVolumeMultiplier0.65Volume must be >= average*multiplier (0.1,0.1,5.0)
InpEnableSessionFilterstrueEnable session-based trading
InpUseServerTimetrueUse broker server time (vs local)
InpTesterIgnoreMarketClosurestrueIgnore market closure guards while running in Strategy Tester
InpAsianSessionEnabledtrueEnable trading during Asian session
InpAsianSessionStartHour4Asian session start hour (0,1,23)
InpAsianSessionStartMinute20Asian session start minute (0,1,59)
InpAsianSessionEndHour19Asian session end hour (0,1,23)
InpAsianSessionEndMinute40Asian session end minute (0,1,59)
InpEuropeanSessionEnabledtrueEnable trading during European session
InpEuropeanSessionStartHour4European session start hour (0,1,23)
InpEuropeanSessionStartMinute0European session start minute (0,1,59)
InpEuropeanSessionEndHour17European session end hour (0,1,23)
InpEuropeanSessionEndMinute0European session end minute (0,1,59)
InpUSSessionEnabledtrueEnable trading during US session
InpUSSessionStartHour0US session start hour (0,1,23)
InpUSSessionStartMinute0US session start minute (0,1,59)
InpUSSessionEndHour10US session end hour (0,1,23)
InpUSSessionEndMinute0US session end minute (0,1,59)
InpCustomSessionEnabledfalseEnable trading during custom session
InpCustomSessionStartHour22Custom session start hour (0,1,23)
InpCustomSessionStartMinute0Custom session start minute (0,1,59)
InpCustomSessionEndHour23Custom session end hour (0,1,23)
InpCustomSessionEndMinute59Custom session end minute (0,1,59)
InpEnableEndOfDayClosefalseClose all trades at specific time
InpEndOfDayCloseHour23Close hour (0,1,23)
InpEndOfDayCloseMinute45Close minute (0,1,59)
InpEndOfDayProfitOnlyfalseOnly close profitable positions
InpEndOfDayBlockNewTradestrueBlock new trades after close time
InpEnableChoppinessFiltertrueEnable choppiness detection and filtering
InpChopRequireLayers1Layers required to confirm choppiness (1,1,4)
InpChopUseChopIndexfalseEnable Choppiness Index layer
InpChopIndexTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CHOP indicator timeframe
InpChopIndexPeriod134CHOP calculation period (10,1,50)
InpChopIndexThreshold52.5Choppy when CHOP > threshold (50.0,1.0,80.0)
InpChopUseAdxfalseEnable ADX trend strength layer
InpChopAdxTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ADX timeframe
InpChopAdxPeriod45ADX period (7,1,50)
InpChopAdxMinTrend82.5Choppy when ADX < threshold (15.0,1.0,40.0)
InpChopUseRangeCompressiontrueEnable range compression detection
InpChopRangeTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Range compression timeframe
InpChopRangeLookback18Bars to compare range compression (3,1,20)
InpChopRangeAtrPeriod28ATR period for range comparison (10,1,50)
InpChopRangeCompressionRatio0.75Choppy when range < ATR*ratio (0.2,0.1,1.0)
InpChopUseAdaptiveThresholdsfalseDynamically adjust thresholds based on volatility
InpChopAdaptiveAtrPeriod50ATR period for adaptive scaling (20,1,100)
InpChopAdaptiveMultiplier1.5Volatility multiplier for adaptive mode (0.5,0.1,3.0)
InpENDOFFILTERS"=== END OF Filters ==="Section header for inputs
InpExitSectionHeader"=== EXIT STRATEGIES ==="Section header for inputs
InpEnableProfitScalingfalseEnable partial profit taking
InpScalingLevels3Number of scaling levels (1,1,5)
InpScalingTargets"50,100,200"Profit targets (points), comma-separated
InpScalingPercents"30,30,40"% to close at each level
InpEnableMaxHoldingTimefalseEnable position time limits
InpMaxHoldingHours14Maximum holding time (hours) (1,1,240)
InpCloseProfitableOnlytrueClose only profitable positions
InpMinProfitThreshold0.0Profit threshold (points) (0.0,1.0,500.0)
InpEnableMomentumExitfalseExit on momentum loss
InpMomTimeframe7Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpMomRsiPeriod124RSI period for momentum exit (5,1,30)
InpMomRsiOverbought70.0RSI exit for buys (60.0,1.0,100.0)
InpMomRsiOversold40.0RSI exit for sells (0.0,1.0,40.0)
InpMomAdxPeriod14ADX period for exit (7,1,30)
InpMomAdxWeakThreshold0.0Exit when ADX drops below (5.0,1.0,40.0)
InpEnableVolatilityExitfalseExit on ATR spike
InpVolExitAtrTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1)
InpVolExitAtrPeriod79ATR period (5,1,50)
InpVolExitAtrAvgPeriod25ATR average period (10,1,200)
InpVolSpikeMultiplier1.8ATR spike threshold vs avg (1.0,0.1,10.0)
InpVolExitProfitOnlytrueRequire profit before ATR spike exit
InpEnableSRExitfalseExit at key levels
InpSRLookbackBars50Bars to find swing points (5,1,500)
InpSRDistancePoints20.0Distance to trigger exit (1.0,1.0,1000.0)
InpSRExitProfitOnlyfalseOnly if profitable
InpEnableCCIExittrueEnable CCI exhaustion exit
InpCCITimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // CCI timeframe
InpCCIPeriod28CCI period (10,1,50)
InpCCIPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // CCI applied price
InpCCIOverbought345.0Overbought level (100.0,10.0,300.0)
InpCCIOversold-585.0Oversold level (-300.0,10.0,-100.0)
InpCCIUseDivergencetrueDetect divergence
InpCCIDivergenceBars32Divergence lookback bars (3,1,20)
InpCCICloseProfittrueClose profitable positions
InpCCICloseLossfalseClose losing positions too
InpCCIMinProfitPoints51.0Min profit to close (0.0,1.0,100.0)
InpEnableMACDSlopeExitfalseEnable MACD slope exit
InpMACDTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // MACD timeframe
InpMACDFastEMA12Fast EMA (5,1,50)
InpMACDSlowEMA26Slow EMA (10,1,100)
InpMACDSignal9Signal line (5,1,20)
g_InpMacdPrice1Applied price (1=close,2=open,3=high,4=low,5=median,6=typical,7=weighted) // MACD applied price
InpMACDWatchHistogramtrueMonitor histogram slope
InpMACDSlopeBars2Bars for slope calculation (1,1,5)
InpMACDWaitZeroCrossfalseWait for zero line cross
InpMACDCloseProfittrueClose profitable positions
InpMACDCloseLossfalseClose losing positions too
InpMACDMinProfitPoints5.0Min profit to close (0.0,1.0,100.0)
InpMACDMinSlopeThreshold0.0001Min histogram change (0.0,0.00001,0.001)
InpEnableSwingExitfalseEnable swing reversal exit
InpSwingLeftBars3Left bars for swing (2,1,10)
InpSwingRightBars2Right bars for swing (1,1,10)
InpSwingMinSize20.0Min swing size points (5.0,1.0,100.0)
InpSwingPartialClosetrueClose half positions first
InpSwingCloseProfittrueClose profitable positions
InpSwingCloseLossfalseClose losing positions too
InpSwingMinProfitPoints15.0Min profit to close (0.0,1.0,100.0)
InpSwingMaxAge3Max bars ago for swing (1,1,10)
InpEnableStochExittrueEnable stochastic exit
InpStochTimeframe5Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Stochastic timeframe
InpStochKPeriod47%K period (5,1,50)
InpStochDPeriod27%D period (2,1,20)
InpStochSlowing23Slowing (1,1,10)
InpStochOverbought512.0Overbought (70.0,5.0,100.0)
InpStochOversold110.0Oversold (0.0,5.0,30.0)
InpStochWaitCrosstrueWait for %K/%D crossover
InpStochCloseProfitfalseClose profitable positions
InpStochCloseLosstrueClose losing positions too
InpStochMinProfitPoints26.0Min profit to close (0.0,1.0,100.0)
InpEnableROCExitfalseEnable ROC momentum exit
InpROCTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // ROC timeframe
InpROCPeriod12ROC lookback period (5,1,50)
InpROCThreshold0.5Min ROC to stay in (0.0,0.1,5.0)
InpROCWeakBars2Consecutive weak bars (1,1,5)
InpROCCloseNewestfalseClose newest positions first
InpROCCloseProfittrueClose profitable positions
InpROCCloseLossfalseClose losing positions too
InpROCMinProfitPoints0.0Min profit to close (0.0,1.0,100.0)
InpEnableMTFExitfalseEnable MTF trend exit
InpMTFTimeframe8Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // Higher timeframe to monitor
InpMTFMAPeriod50MA period for trend (20,1,200)
InpMTFMAMethodMODE_EMAMA method
InpMTFCloseOnCrosstrueClose when price crosses MA
InpMTFPartialExittrueClose oldest 50% first
InpMTFCloseProfittrueClose profitable positions
InpMTFCloseLossfalseClose losing positions too
InpMTFMinProfitPoints20.0Min profit to close (0.0,1.0,100.0)
InpEnableSARExitfalseEnable SAR flip exit
InpSARTimeframe0Timeframe (1=M1,2=M5,3=M15,4=M30,5=H1,6=H4,7=D1) // SAR timeframe
InpSARStep0.02SAR step (0.01,0.001,0.1)
InpSARMaximum0.2SAR maximum (0.1,0.01,0.5)
InpSARCloseAlltrueClose all positions on flip
InpSARCloseProfittrueClose profitable positions
InpSARCloseLossfalseClose losing positions too
InpSARMinProfitPoints0.0Min profit to close (0.0,1.0,100.0)
InpExitSectionHeaderEND"=== END OF EXIT STRATEGIES ==="Section header for inputs
InputDashboardSectionHeader"=== DASHBOARD AND Visualization ==="Section header for inputs
InpShowDashboardfalseDisplay on-chart dashboard
InpDashboardX8Dashboard X position (pixels)
InpDashboardY28Dashboard Y position (pixels)
InpDashboardWidth360Dashboard width (pixels)
InpDashboardBgColor(color)525572Dashboard background color
InpDashboardBgOpacity245Dashboard fill opacity (0 transparent, 255 solid) (0,1,255)
InpDashboardTextColor(color)16777215Dashboard text color
InpDashboardAccentColor(color)16748574Dashboard header/accent color
InpAttachHullIndicatorsfalseShow Hull indicator overlays on chart
InpHullIndicatorSubwindow1Subwindow index for Hull overlays (0=main chart, 1+=subwindows)
InpShowRsiIndicatorfalseDisplay RSI indicator visualization
InpRsiIndicatorSubwindow2Subwindow index for RSI visualization (1+=subwindows)
InpShowAdxIndicatorfalseDisplay ADX indicator visualization
InpAdxIndicatorSubwindow3Subwindow index for ADX visualization (1+=subwindows)
InpShowAtrIndicatorfalseDisplay ATR indicator visualization
InpAtrIndicatorSubwindow4Subwindow index for ATR visualization (1+=subwindows)
كود المصدر (.mq5)Open Source
Pipsgrowth_com_EX16104.mq5
#property copyright "Pipsgrowth.com"
#property link      "https://pipsgrowth.com"
#property version   "2.00"
#property strict
#property description "Pipsgrowth.com EX16104 Hull2EA — four Hull V7 indicator trend EA with advanced exits, full 12-layer stack."

#include <Trade/Trade.mqh>
#include <Trade/PositionInfo.mqh>

//+------------------------------------------------------------------+
//| Internal Hull V7 Calculator Class                                |
//+------------------------------------------------------------------+
class CHullV7Calculator
{
private:
   string             m_symbol;
   ENUM_TIMEFRAMES    m_timeframe;
   int                m_period;
   double             m_divisor;
   ENUM_APPLIED_PRICE m_price;
   double             m_flatSensitivity;
   int                m_flatBars;
   bool               m_useAdx;
   int                m_adxHandle;
   double             m_adxThreshold;
   
   double CalculateWMA(const double &price[], int n, int shift)
   {
      if(n <= 0) return 0.0;
      double sum = 0.0;
      double weightSum = 0.0;
      int size = ArraySize(price);
      
      for(int i = 0; i < n; i++)
      {
         int idx = shift + i;
         if(idx >= size) break;
         
         double w = (double)(n - i);
         sum += price[idx] * w;
         weightSum += w;
      }
      return (weightSum > 0.0) ? sum / weightSum : 0.0;
   }

public:
   CHullV7Calculator() : m_adxHandle(INVALID_HANDLE) {}
   ~CHullV7Calculator() 
   { 
      if(m_adxHandle != INVALID_HANDLE) 
         IndicatorRelease(m_adxHandle); 
   }

   bool Init(string symbol, int period, double divisor, ENUM_APPLIED_PRICE price,
             ENUM_TIMEFRAMES timeframe, double flatSensitivity, int flatBars,
             bool useAdx, ENUM_TIMEFRAMES adxTf, int adxPer, double adxThresh)
   {
      m_symbol = symbol;
      m_period = period;
      m_divisor = divisor;

الكود المصدري الكامل متاح عند التحميل

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

الوسوم:ex16104trendpipsgrowthfreemt5xauusd

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

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

وسطاء موصى بهم لهذا الإكسبرت

هذه الروبوتات تعمل على MT5 — استخدم وسيطاً موثوقاً بتنفيذ سريع وسبريد منخفض

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

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

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

اسم الملفPipsgrowth_com_EX16104.mq5
حجم الملف599.6 KB
الإصدارv2.00
PlatformMetaTrader 5
نوع الملف.mq5 Source
الاستراتيجيةمتابعة الاتجاه
المخاطرةمخاطرة متوسطة
الأطر الزمنية
M5H1
أزواج العملات
XAUUSD
الحد الأدنى للإيداع$100