mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-08-24 09:48:05 +00:00
docs(indicators): Refactored to use RSI_Engine
This commit is contained in:
@@ -30,7 +30,7 @@ Our MQL5 implementation follows a modern, component-based, object-oriented desig
|
|||||||
|
|
||||||
* **Component-Based Design (Composition):**
|
* **Component-Based Design (Composition):**
|
||||||
The StochRSI calculator (`StochRSI_Fast_Calculator.mqh`) is a powerful orchestrator that reuses two of our core engines:
|
The StochRSI calculator (`StochRSI_Fast_Calculator.mqh`) is a powerful orchestrator that reuses two of our core engines:
|
||||||
1. **RSI Engine:** It delegates the RSI calculation to the robust `RSI_Pro_Calculator.mqh`.
|
1. **RSI Engine:** It delegates the RSI calculation to the shared `RSI_Engine.mqh`. This ensures that the underlying RSI values are identical to those of the standard RSI indicator.
|
||||||
2. **MA Engine:** It delegates the %D signal line smoothing to the universal `MovingAverage_Engine.mqh`.
|
2. **MA Engine:** It delegates the %D signal line smoothing to the universal `MovingAverage_Engine.mqh`.
|
||||||
This ensures mathematical consistency across the entire suite and eliminates code duplication.
|
This ensures mathematical consistency across the entire suite and eliminates code duplication.
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@ Our MQL5 implementation follows a modern, component-based, object-oriented desig
|
|||||||
Unlike basic implementations that recalculate the entire history on every tick, this indicator employs an intelligent incremental algorithm.
|
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.
|
* **State Tracking:** It utilizes `prev_calculated` to process only new bars.
|
||||||
* **Persistent Buffers:** Internal buffers persist their state between ticks.
|
* **Persistent Buffers:** Internal buffers persist their state between ticks.
|
||||||
* **Robust Offset Handling:** The engine correctly handles the initialization periods of the chained calculations (RSI -> StochRSI -> %D), ensuring that each step starts only when valid data is available. This prevents artifacts and "INF" errors at the beginning of the chart.
|
* **Robust Offset Handling:** The engine correctly handles the initialization periods of the chained calculations (RSI -> StochRSI -> %D), ensuring that each step starts only when valid data is available.
|
||||||
|
|
||||||
* **Object-Oriented Logic:**
|
* **Object-Oriented Logic:**
|
||||||
* The Heikin Ashi version (`CStochRSI_Fast_Calculator_HA`) is achieved simply by instructing the main calculator to instantiate the Heikin Ashi version of the RSI module.
|
* The Heikin Ashi version (`CStochRSI_Fast_Calculator_HA`) is achieved simply by instructing the main calculator to instantiate the Heikin Ashi version of the RSI Engine (`CRSIEngine_HA`).
|
||||||
|
|
||||||
## 4. Parameters
|
## 4. Parameters
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user