From 94fa2941c766a35bf74d56f7ed0999a1a87ab140 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Tue, 25 Nov 2025 14:01:09 +0100 Subject: [PATCH] refactor: Added selectable signal line type --- .../5_Ehlers_Hybrids/MACD_SuperSmoother_Pro.mq5 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Indicators/MyIndicators/Authors/Ehlers/5_Ehlers_Hybrids/MACD_SuperSmoother_Pro.mq5 b/Indicators/MyIndicators/Authors/Ehlers/5_Ehlers_Hybrids/MACD_SuperSmoother_Pro.mq5 index 5d74fb2..53cabaa 100644 --- a/Indicators/MyIndicators/Authors/Ehlers/5_Ehlers_Hybrids/MACD_SuperSmoother_Pro.mq5 +++ b/Indicators/MyIndicators/Authors/Ehlers/5_Ehlers_Hybrids/MACD_SuperSmoother_Pro.mq5 @@ -4,10 +4,8 @@ //| | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" -#property link "" -#property version "1.00" -#property description "MACD variant using John Ehlers' SuperSmoother for all moving averages." -#property description "Supports Standard and Heikin Ashi price sources." +#property version "1.10" // Added selectable signal line type +#property description "MACD with SuperSmoother base lines and a selectable signal line." #property indicator_separate_window #property indicator_buffers 3 @@ -31,11 +29,15 @@ #include //--- Input Parameters --- +input group "MACD Settings" input int InpFastPeriod = 12; input int InpSlowPeriod = 26; -input int InpSignalPeriod = 9; input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD; +input group "Signal Line Settings" +input int InpSignalPeriod = 9; +input ENUM_SMOOTHING_METHOD InpSignalMAType = SMOOTH_SuperSmoother; // Default to SuperSmoother + //--- Indicator Buffers --- double BufferMACD_Histogram[], BufferMACDLine[], BufferSignalLine[]; @@ -57,7 +59,8 @@ int OnInit() else g_calculator = new CMACDSuperSmootherCalculator(); - if(CheckPointer(g_calculator) == POINTER_INVALID || !g_calculator.Init(InpFastPeriod, InpSlowPeriod, InpSignalPeriod)) + if(CheckPointer(g_calculator) == POINTER_INVALID || + !g_calculator.Init(InpFastPeriod, InpSlowPeriod, InpSignalPeriod, InpSignalMAType)) { Print("Failed to create or initialize MACD SuperSmoother Calculator."); return(INIT_FAILED);