From 0a793a406d5b1e7e9a309519bcd67c66a69340d8 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Tue, 23 Dec 2025 15:51:38 +0100 Subject: [PATCH] refactor: Refactored to use MovingAverage_Engine --- Indicators/MyIndicators/RSI_Oscillator.mq5 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Indicators/MyIndicators/RSI_Oscillator.mq5 b/Indicators/MyIndicators/RSI_Oscillator.mq5 index 37083f0..c8bb696 100644 --- a/Indicators/MyIndicators/RSI_Oscillator.mq5 +++ b/Indicators/MyIndicators/RSI_Oscillator.mq5 @@ -3,7 +3,7 @@ //| Copyright 2025, xxxxxxxx| //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" -#property version "3.10" // Optimized for incremental calculation +#property version "3.20" // Refactored to use MovingAverage_Engine #property description "RSI Oscillator (Histogram of RSI vs Signal Line) with selectable price source." #property indicator_separate_window @@ -23,7 +23,8 @@ input int InpPeriodRSI = 14; input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD; input group "Signal Line Settings" input int InpPeriodMA = 14; -input ENUM_MA_METHOD InpMethodMA = MODE_SMA; +// UPDATED: Use ENUM_MA_TYPE +input ENUM_MA_TYPE InpMethodMA = SMA; //--- Indicator Buffers --- double BufferOscillator[]; @@ -128,3 +129,4 @@ int OnCalculate(const int rates_total, return(rates_total); } //+------------------------------------------------------------------+ +//+------------------------------------------------------------------+