From 0ffc28c9f8b0a9a18b3afc73303dfbeaa65fbe5c Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Fri, 14 Nov 2025 15:26:36 +0100 Subject: [PATCH] refactor: Added public GetPeriod() method --- Include/MyIncludes/MovingAverage_Engine.mqh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Include/MyIncludes/MovingAverage_Engine.mqh b/Include/MyIncludes/MovingAverage_Engine.mqh index c7e9454..ca6e278 100644 --- a/Include/MyIncludes/MovingAverage_Engine.mqh +++ b/Include/MyIncludes/MovingAverage_Engine.mqh @@ -1,6 +1,6 @@ //+------------------------------------------------------------------+ //| MovingAverage_Engine.mqh | -//| VERSION 1.10: Fixed array resizing bug in PreparePriceSeries.| +//| VERSION 1.11: Added public GetPeriod() method. | //| Copyright 2025, xxxxxxxx | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" @@ -32,6 +32,9 @@ public: bool Init(int period, ENUM_MA_TYPE ma_type); void Calculate(int rates_total, ENUM_APPLIED_PRICE price_type, const double &open[], const double &high[], const double &low[], const double &close[], double &ma_buffer[]); + + //--- NEW: Public getter for the period + int GetPeriod(void) const { return m_period; } }; //--- Derived class for Heikin Ashi version ---