From ae4b0c81e3dda8b63a19d8072c1362cacb66196c Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Sun, 21 Dec 2025 16:50:04 +0100 Subject: [PATCH] refactor: Optimized for incremental calculation --- .../Authors/Ehlers/1_Smoothers/Ehlers_Smoother_Pro.mq5 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Indicators/MyIndicators/Authors/Ehlers/1_Smoothers/Ehlers_Smoother_Pro.mq5 b/Indicators/MyIndicators/Authors/Ehlers/1_Smoothers/Ehlers_Smoother_Pro.mq5 index 260561c..b769664 100644 --- a/Indicators/MyIndicators/Authors/Ehlers/1_Smoothers/Ehlers_Smoother_Pro.mq5 +++ b/Indicators/MyIndicators/Authors/Ehlers/1_Smoothers/Ehlers_Smoother_Pro.mq5 @@ -13,7 +13,7 @@ #property indicator_type1 DRAW_LINE #property indicator_color1 clrBlueViolet #property indicator_style1 STYLE_SOLID -#property indicator_width1 1 +#property indicator_width1 2 #include @@ -66,11 +66,9 @@ void OnDeinit(const int reason) delete g_calculator; } -//+------------------------------------------------------------------+ -//| Custom indicator calculation function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, - const int prev_calculated, // <--- Now used! + const int prev_calculated, const datetime &time[], const double &open[], const double &high[], @@ -89,7 +87,6 @@ int OnCalculate(const int rates_total, else price_type = (ENUM_APPLIED_PRICE)InpSourcePrice; -//--- Delegate calculation with prev_calculated optimization g_calculator.Calculate(rates_total, prev_calculated, price_type, open, high, low, close, BufferFilter); return(rates_total);