From d447e4434cca6f954b5f0e90db82d6f0a23919fe Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Sun, 18 Jan 2026 17:43:53 +0100 Subject: [PATCH] refactor(indicators): Updated with flexible Signal Line --- .../Ehlers/2_Oscillators/Laguerre_ACS_Pro.mq5 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_ACS_Pro.mq5 b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_ACS_Pro.mq5 index 35b3beb..97ea225 100644 --- a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_ACS_Pro.mq5 +++ b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_ACS_Pro.mq5 @@ -3,7 +3,7 @@ //| Copyright 2026, xxxxxxxx| //+------------------------------------------------------------------+ #property copyright "Copyright 2026, xxxxxxxx" -#property version "1.00" +#property version "2.00" // Updated with flexible Signal Line #property description "Laguerre Adaptive Cyber Cycle (ACS). Combines Adaptive Laguerre" #property description "filtering with the Cyber Cycle for superior cycle detection." @@ -22,7 +22,7 @@ #property indicator_label2 "Signal" #property indicator_type2 DRAW_LINE #property indicator_color2 clrOrangeRed -#property indicator_style2 STYLE_DOT +#property indicator_style2 STYLE_SOLID #property indicator_width2 1 #property indicator_level1 0.0 @@ -33,6 +33,11 @@ input double InpAlpha = 0.07; // Cyber Cycle Alpha input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_MEDIAN_STD; // Price Source +input group "Signal Line Settings" +input ENUM_CYBER_SIGNAL_TYPE InpSignalType = SIGNAL_DELAY_1BAR; // Signal Type +input int InpSignalPeriod = 3; // Period (if MA) +input ENUM_MA_TYPE InpSignalMethod = SMA; // Method (if MA) + //--- Buffers double BufferCycle[]; double BufferSignal[]; @@ -57,7 +62,8 @@ int OnInit() g_calculator = new CLaguerreACSCalculator(); //--- Initialize - if(CheckPointer(g_calculator) == POINTER_INVALID || !g_calculator.Init(InpAlpha)) + if(CheckPointer(g_calculator) == POINTER_INVALID || + !g_calculator.Init(InpAlpha, InpSignalType, InpSignalPeriod, InpSignalMethod)) { Print("Failed to initialize Laguerre ACS Calculator."); return(INIT_FAILED); @@ -65,7 +71,8 @@ int OnInit() //--- Shortname string type = (InpSourcePrice <= PRICE_HA_CLOSE) ? " HA" : ""; - IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("Laguerre ACS%s(%.2f)", type, InpAlpha)); + string sigStr = (InpSignalType == SIGNAL_DELAY_1BAR) ? "Delay" : EnumToString(InpSignalMethod); + IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("Laguerre ACS%s(%.2f, %s)", type, InpAlpha, sigStr)); PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, 10); PlotIndexSetInteger(1, PLOT_DRAW_BEGIN, 11);