mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-08-20 15:58:07 +00:00
refactor: Butterworth_Calculator
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
//| |
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "Copyright 2025, xxxxxxxx"
|
||||
#property version "1.00"
|
||||
#property version "1.10" // Adapted to new universal calculator
|
||||
#property description "John Ehlers' Higher-Order Butterworth Filter."
|
||||
|
||||
#property indicator_chart_window
|
||||
@@ -46,7 +46,8 @@ int OnInit()
|
||||
IndicatorSetString(INDICATOR_SHORTNAME, StringFormat("Butterworth(%d,%d)", InpPeriod, (int)InpPoles));
|
||||
}
|
||||
|
||||
if(CheckPointer(g_calculator) == POINTER_INVALID || !g_calculator.Init(InpPeriod, InpPoles))
|
||||
// CORRECTED: Pass the source type to the Init function
|
||||
if(CheckPointer(g_calculator) == POINTER_INVALID || !g_calculator.Init(InpPeriod, InpPoles, SOURCE_PRICE))
|
||||
{
|
||||
Print("Failed to initialize Butterworth Calculator.");
|
||||
return(INIT_FAILED);
|
||||
|
||||
Reference in New Issue
Block a user