From dcaf7258ab8bd06d7e46d1a6fca9efd0e47cc750 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Mon, 29 Sep 2025 13:13:08 +0200 Subject: [PATCH] refactor: add CCI_Engine --- Indicators/MyIndicators/CCI_Pro.mq5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Indicators/MyIndicators/CCI_Pro.mq5 b/Indicators/MyIndicators/CCI_Pro.mq5 index 82b93c0..72cb365 100644 --- a/Indicators/MyIndicators/CCI_Pro.mq5 +++ b/Indicators/MyIndicators/CCI_Pro.mq5 @@ -5,7 +5,7 @@ //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" #property link "" -#property version "3.01" // Corrected calculator logic and draw begin +#property version "3.02" // Final unified architecture #property description "Professional Commodity Channel Index (CCI) with a signal line and" #property description "selectable price source (Standard and Heikin Ashi)." @@ -89,7 +89,8 @@ int OnInit() } else // Standard price source selected { - g_calculator = new CCCI_Calculator(); + //--- CORRECTED: Instantiate the concrete class, not the abstract one + g_calculator = new CCCI_Calculator_Std(); IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("CCI(%d, %d)", InpCCIPeriod, InpMAPeriod)); } @@ -101,7 +102,6 @@ int OnInit() } //--- Set indicator display properties -//--- CORRECTED: The first CCI value is at (period-1), the first signal value is at (period-1 + ma_period-1) int cci_draw_begin = InpCCIPeriod - 1; PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, cci_draw_begin); PlotIndexSetInteger(1, PLOT_DRAW_BEGIN, cci_draw_begin + InpMAPeriod - 1);