From ce428665fc496eb736c01192ca166b87f73f05a2 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Sun, 18 Jan 2026 17:40:33 +0100 Subject: [PATCH] refactor(indicators): Updated with flexible Signal Line --- .../2_Oscillators/Laguerre_Cyber_Cycle_Pro.mq5 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_Cyber_Cycle_Pro.mq5 b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_Cyber_Cycle_Pro.mq5 index fe1d7c5..4b2ea98 100644 --- a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_Cyber_Cycle_Pro.mq5 +++ b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Laguerre_Cyber_Cycle_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 Cyber Cycle. Uses a standard Laguerre Filter for" #property description "pre-smoothing before applying the Cyber Cycle algorithm." @@ -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 @@ -37,6 +37,11 @@ input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_MEDIAN_STD; // Price Sou input group "Cyber Cycle Settings" input double InpAlpha = 0.07; // Cyber Cycle Alpha +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[]; @@ -62,7 +67,7 @@ int OnInit() //--- Initialize if(CheckPointer(g_calculator) == POINTER_INVALID || - !g_calculator.Init(InpGamma, InpAlpha)) + !g_calculator.Init(InpGamma, InpAlpha, InpSignalType, InpSignalPeriod, InpSignalMethod)) { Print("Failed to initialize Laguerre Cyber Cycle Calculator."); return(INIT_FAILED); @@ -70,7 +75,8 @@ int OnInit() //--- Shortname string type = (InpSourcePrice <= PRICE_HA_CLOSE) ? " HA" : ""; - IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("Laguerre Cyber Cycle%s(%.2f, %.2f)", type, InpGamma, InpAlpha)); + string sigStr = (InpSignalType == SIGNAL_DELAY_1BAR) ? "Delay" : EnumToString(InpSignalMethod); + IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("Laguerre Cyber Cycle%s(%.2f, %.2f, %s)", type, InpGamma, InpAlpha, sigStr)); PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, 10); PlotIndexSetInteger(1, PLOT_DRAW_BEGIN, 11);