mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-08-26 02:38:05 +00:00
refactor: Fixed uninitialized buffer bug on W1
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
//| MovingAverage_Ribbon_MTF_Calculator.mqh|
|
//| MovingAverage_Ribbon_MTF_Calculator.mqh|
|
||||||
//| Engine for the fully customizable MTF MA Ribbon. |
|
//| VERSION 2.20: Fixed uninitialized buffer bug on W1. |
|
||||||
//| Contains both the Line Helper and the Ribbon Manager. |
|
|
||||||
//| Copyright 2025, xxxxxxxx |
|
//| Copyright 2025, xxxxxxxx |
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
#property copyright "Copyright 2025, xxxxxxxx"
|
#property copyright "Copyright 2025, xxxxxxxx"
|
||||||
@@ -82,8 +81,12 @@ void CSingleMAMTFCalculator::Calculate(int rates_total, int prev_calculated, con
|
|||||||
if(CheckPointer(m_calculator) == POINTER_INVALID)
|
if(CheckPointer(m_calculator) == POINTER_INVALID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// CRITICAL FIX: Initialize buffer with EMPTY_VALUE on full recalc.
|
||||||
if(prev_calculated == 0)
|
if(prev_calculated == 0)
|
||||||
|
{
|
||||||
|
ArrayInitialize(output_buffer, EMPTY_VALUE);
|
||||||
m_htf_prev_calc = 0;
|
m_htf_prev_calc = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//--- MTF MODE ---
|
//--- MTF MODE ---
|
||||||
if(m_is_mtf)
|
if(m_is_mtf)
|
||||||
|
|||||||
Reference in New Issue
Block a user