From bebed92f5a8bd3ff3a99511577c1dd6625aab8e0 Mon Sep 17 00:00:00 2001 From: Toh4iem9 Date: Sun, 4 Jan 2026 15:58:53 +0100 Subject: [PATCH] refactor(indicators): Optimized for incremental calculation --- .../Ehlers/2_Oscillators/Fisher_Transform_Pro.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Fisher_Transform_Pro.md b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Fisher_Transform_Pro.md index fdc4c57..dac9105 100644 --- a/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Fisher_Transform_Pro.md +++ b/Indicators/MyIndicators/Authors/Ehlers/2_Oscillators/Fisher_Transform_Pro.md @@ -34,9 +34,17 @@ The indicator follows a multi-step process to transform the price data. ## 3. MQL5 Implementation Details +Our MQL5 implementation follows a modern, object-oriented design to ensure stability and performance. + * **Self-Contained Calculator (`Fisher_Transform_Calculator.mqh`):** The entire multi-stage calculation is encapsulated within a dedicated, reusable calculator class. + +* **Optimized Incremental Calculation (O(1)):** + Unlike basic implementations that recalculate the entire history on every tick, this indicator employs an intelligent incremental algorithm. + * **State Tracking:** It utilizes `prev_calculated` to process only new bars. + * **Persistent Buffers:** The internal buffers (for smoothed values and the final Fisher output) persist their state between ticks. This allows the recursive calculation to continue seamlessly from the last known values without re-processing the entire history. + * **Heikin Ashi Integration:** An inherited `_HA` class allows the calculation to be performed seamlessly on smoothed Heikin Ashi data. -* **Stability via Full Recalculation:** The indicator employs a full recalculation on every `OnCalculate` call. This is the most robust method for a state-dependent indicator that involves smoothing and normalization. + * **Definition-True Price Source:** The calculator is hard-coded to use the **Median Price `(High+Low)/2`** as the source, in accordance with John Ehlers' original articles on this specific implementation. ## 4. Parameters