refactor: Refactored to use MovingAverage_Engine

This commit is contained in:
Toh4iem9
2025-12-23 15:51:38 +01:00
parent db0e5cc80f
commit 0a793a406d
+4 -2
View File
@@ -3,7 +3,7 @@
//| Copyright 2025, xxxxxxxx| //| Copyright 2025, xxxxxxxx|
//+------------------------------------------------------------------+ //+------------------------------------------------------------------+
#property copyright "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 description "RSI Oscillator (Histogram of RSI vs Signal Line) with selectable price source."
#property indicator_separate_window #property indicator_separate_window
@@ -23,7 +23,8 @@ input int InpPeriodRSI = 14;
input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD; input ENUM_APPLIED_PRICE_HA_ALL InpSourcePrice = PRICE_CLOSE_STD;
input group "Signal Line Settings" input group "Signal Line Settings"
input int InpPeriodMA = 14; input int InpPeriodMA = 14;
input ENUM_MA_METHOD InpMethodMA = MODE_SMA; // UPDATED: Use ENUM_MA_TYPE
input ENUM_MA_TYPE InpMethodMA = SMA;
//--- Indicator Buffers --- //--- Indicator Buffers ---
double BufferOscillator[]; double BufferOscillator[];
@@ -128,3 +129,4 @@ int OnCalculate(const int rates_total,
return(rates_total); return(rates_total);
} }
//+------------------------------------------------------------------+ //+------------------------------------------------------------------+
//+------------------------------------------------------------------+