From fb0ac45397dc510fd959871addc16f00c87bf16b Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Fri, 2 Jan 2026 14:12:19 +0100 Subject: [PATCH] refactor(indicators): Integrated with CMO Engine --- Indicators/MyIndicators/VIDYA_Pro.mq5 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Indicators/MyIndicators/VIDYA_Pro.mq5 b/Indicators/MyIndicators/VIDYA_Pro.mq5 index 17fdd85..a1564c6 100644 --- a/Indicators/MyIndicators/VIDYA_Pro.mq5 +++ b/Indicators/MyIndicators/VIDYA_Pro.mq5 @@ -13,7 +13,7 @@ #property indicator_type1 DRAW_LINE #property indicator_color1 clrRed #property indicator_style1 STYLE_SOLID -#property indicator_width1 1 +#property indicator_width1 2 #property indicator_label1 "VIDYA" #include @@ -25,8 +25,6 @@ input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD; double BufferVIDYA[]; CVIDYACalculator *g_calculator; -//+------------------------------------------------------------------+ -//| | //+------------------------------------------------------------------+ int OnInit() { @@ -52,11 +50,9 @@ int OnInit() void OnDeinit(const int reason) { if(CheckPointer(g_calculator) != POINTER_INVALID) 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[], @@ -75,9 +71,9 @@ 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, BufferVIDYA); return(rates_total); } //+------------------------------------------------------------------+ +//+------------------------------------------------------------------+