diff --git a/Indicators/MyIndicators/Stochastic_CMO_Slow_Pro.mq5 b/Indicators/MyIndicators/Stochastic_CMO_Slow_Pro.mq5 index 92f9e2c..416677a 100644 --- a/Indicators/MyIndicators/Stochastic_CMO_Slow_Pro.mq5 +++ b/Indicators/MyIndicators/Stochastic_CMO_Slow_Pro.mq5 @@ -3,7 +3,7 @@ //| Copyright 2025, xxxxxxxx| //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" -#property version "2.00" // Refactored to use MovingAverage_Engine +#property version "3.10" // Fixed Calculate parameters #property description "Slow Stochastic applied to the Chande Momentum Oscillator (CMO)." #property indicator_separate_window @@ -36,7 +36,6 @@ input int InpSlowingPeriod = 3; input int InpDPeriod = 3; input group "MA & Price Settings" input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD; -// UPDATED: Use ENUM_MA_TYPE input ENUM_MA_TYPE InpSlowingMAType = SMA; input ENUM_MA_TYPE InpDMAType = SMA; @@ -85,7 +84,10 @@ int OnCalculate(const int rates_total, const int prev_calculated, const datetime return 0; ENUM_APPLIED_PRICE price_type = (InpSourcePrice <= PRICE_HA_CLOSE) ? (ENUM_APPLIED_PRICE)(-(int)InpSourcePrice) : (ENUM_APPLIED_PRICE)InpSourcePrice; - g_calculator.Calculate(rates_total, prev_calculated, open, high, low, close, price_type, BufferK, BufferD); +// FIX: Correct parameter order +// Calculate(rates_total, prev_calculated, price_type, open, high, low, close, ...) + g_calculator.Calculate(rates_total, prev_calculated, price_type, open, high, low, close, BufferK, BufferD); + return(rates_total); } //+------------------------------------------------------------------+