mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-08-23 09:18:05 +00:00
refactor: Reverted to Full Recalc for consistency
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
//| MAMA_Pro.mq5|
|
//| MAMA_Pro.mq5|
|
||||||
//| Copyright 2025, xxxxxxxx|
|
//| Copyright 2025, xxxxxxxx|
|
||||||
//| |
|
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
#property copyright "Copyright 2025, xxxxxxxx"
|
#property copyright "Copyright 2025, xxxxxxxx"
|
||||||
#property version "1.00"
|
#property version "1.10" // Reverted to Full Recalc for consistency
|
||||||
#property description "John Ehlers' MESA Adaptive Moving Average (MAMA) and FAMA."
|
#property description "John Ehlers' MESA Adaptive Moving Average (MAMA) and FAMA."
|
||||||
|
|
||||||
#property indicator_chart_window
|
#property indicator_chart_window
|
||||||
@@ -79,7 +78,9 @@ void OnDeinit(const int reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
int OnCalculate(const int rates_total, const int, const datetime&[], const double &open[], const double &high[], const double &low[], const double &close[], const long&[], const long&[], const int&[])
|
//| Custom indicator calculation function |
|
||||||
|
//+------------------------------------------------------------------+
|
||||||
|
int OnCalculate(const int rates_total, const int prev_calculated, const datetime&[], const double &open[], const double &high[], const double &low[], const double &close[], const long&[], const long&[], const int&[])
|
||||||
{
|
{
|
||||||
if(CheckPointer(g_calculator) == POINTER_INVALID)
|
if(CheckPointer(g_calculator) == POINTER_INVALID)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -90,7 +91,9 @@ int OnCalculate(const int rates_total, const int, const datetime&[], const doubl
|
|||||||
else
|
else
|
||||||
price_type = (ENUM_APPLIED_PRICE)InpSourcePrice;
|
price_type = (ENUM_APPLIED_PRICE)InpSourcePrice;
|
||||||
|
|
||||||
|
// Full Recalc (no prev_calculated passed)
|
||||||
g_calculator.Calculate(rates_total, price_type, open, high, low, close, BufferMAMA, BufferFAMA);
|
g_calculator.Calculate(rates_total, price_type, open, high, low, close, BufferMAMA, BufferFAMA);
|
||||||
|
|
||||||
return(rates_total);
|
return(rates_total);
|
||||||
}
|
}
|
||||||
//+------------------------------------------------------------------+
|
//+------------------------------------------------------------------+
|
||||||
|
|||||||
Reference in New Issue
Block a user