mirror of
https://github.com/softwaredevelop/mql5.git
synced 2026-07-27 20:47:44 +00:00
refactor: Fixed smoothing overflow bug
This commit is contained in:
@@ -26,8 +26,8 @@ The indicator uses a Rate of Change (ROC) based algorithm to score each currency
|
||||
|
||||
* **Multi-Symbol Engine (`Currency_Strength_Calculator.mqh`):** The core logic is encapsulated in a robust engine that handles the complexity of accessing data from 28 different symbols simultaneously.
|
||||
* **Robust Data Handling:** The indicator includes advanced synchronization checks (`IsDataReady`). It ensures that historical data for all 28 pairs is fully loaded and synchronized before performing calculations. This prevents the display of misleading or "glitchy" lines during chart startup or timeframe changes.
|
||||
* **Optimized Performance:** To prevent freezing the terminal, the indicator limits the history calculation on the first load. Subsequent updates are incremental and extremely fast.
|
||||
* **Interactive Dashboard:** A custom-drawn dashboard panel in the indicator window provides a real-time, sorted list of currencies with their exact strength values (to 3 decimal places). It gracefully handles missing data by displaying "N/A" instead of erroneous values.
|
||||
* **Safe Smoothing Algorithm:** The smoothing logic is designed to handle data gaps and initialization phases gracefully, preventing mathematical overflows or "exploding" values that can occur when smoothing incomplete data series.
|
||||
* **Interactive Dashboard:** A custom-drawn dashboard panel in the indicator window provides a real-time, sorted list of currencies with their exact strength values (to 3 decimal places). It automatically hides currencies that are disabled in the settings.
|
||||
|
||||
## 4. Parameters
|
||||
|
||||
@@ -37,7 +37,7 @@ The indicator uses a Rate of Change (ROC) based algorithm to score each currency
|
||||
* **`InpSmoothPer`:** The period for the smoothing. Default is `5`.
|
||||
* **`InpShowPanel`:** Toggles the visibility of the dashboard panel.
|
||||
* **Visibility Settings:**
|
||||
* **`InpShowUSD` - `InpShowNZD`:** Individual toggles for each currency. This allows you to hide currencies you are not interested in, reducing chart clutter and focusing your analysis on specific pairs or groups (e.g., only showing USD, EUR, and JPY).
|
||||
* **`InpShowUSD` - `InpShowNZD`:** Individual toggles for each currency. This allows you to hide currencies you are not interested in, reducing chart clutter. The dashboard will also update to show only the selected currencies.
|
||||
|
||||
## 5. Usage and Interpretation
|
||||
|
||||
@@ -66,8 +66,3 @@ The most effective way to use this indicator is during the pre-market analysis b
|
||||
2. **Select Pairs:** Create a "Watchlist" for the day by pairing the Top 2 strongest against the Bottom 2 weakest currencies. (e.g., Strong GBP + Weak AUD -> Trade GBPAUD Long).
|
||||
3. **Focus:** Use the **Visibility Settings** to hide all other currencies, leaving only the ones involved in your watchlist visible on the chart. This removes noise and helps you track the specific battle between your chosen currencies.
|
||||
4. **Wait for Timing:** Switch to a lower timeframe (M5/M15) on your selected pair and use your tactical indicators (like `VWAP_Pro` or `MACD_Laguerre_Pro`) to time the entry.
|
||||
|
||||
### Tips
|
||||
|
||||
* **Avoid Correlation:** Do not trade multiple pairs that are driven by the same currency move (e.g., Long EURUSD and Long GBPUSD) unless you want to double your risk on the USD weakness.
|
||||
* **News Events:** Be aware that high-impact news can cause sudden spikes in the strength lines. Wait for the lines to stabilize after news before entering.
|
||||
|
||||
Reference in New Issue
Block a user