251 라인
18 KiB
Markdown
# Smart Liquidity Hunter — Usage Guide
| |||
| |||
This guide covers **v1.11** of Smart Liquidity Hunter for desktop MetaTrader 4 and MetaTrader 5. It documents the indicator's chart output and signal rules, together with the settings needed to reproduce a review.
| |||
| |||
[Back to the repository overview](../README.md) · [Illustrated website guide](https://forexsignal24.com/smart-liquidity-hunter)
| |||
| |||
## Installation
| |||
| |||
| Terminal | Source in this repository | Destination in the terminal's data folder |
| |||
| --- | --- | --- |
| |||
| MetaTrader 4 | [Smart_Liquidity_Hunter_MT4.mq4](../mt4/Smart_Liquidity_Hunter_MT4.mq4) | `MQL4/Indicators/Smart_Liquidity_Hunter_MT4.mq4` |
| |||
| MetaTrader 5 | [Smart_Liquidity_Hunter_MT5.mq5](../mt5/Smart_Liquidity_Hunter_MT5.mq5) | `MQL5/Indicators/Smart_Liquidity_Hunter_MT5.mq5` |
| |||
| |||
1. Open the desktop terminal in which you intend to use the indicator.
| |||
2. Select **File → Open Data Folder** and copy the matching source file to the destination above. Different broker installations may have different data folders.
| |||
3. Open that file in the matching terminal's MetaEditor.
| |||
4. Select **Compile**, or press **F7**. Inspect the compiler result and resolve any errors before attaching the indicator. Compilation creates the platform-specific executable indicator file.
| |||
5. In the terminal, refresh **Navigator → Indicators**. Restart the terminal if the indicator is still absent.
| |||
6. Attach the indicator to a chart, leave the inputs at their defaults initially, and allow enough history to load.
| |||
| |||
The source has no external include or DLL dependency. The MT4 and MT5 editions use the same signal calculations, with platform-specific plotting code.
| |||
| |||
The initial history gate is `max(2 × SwingStrength + 3, VolatilityPeriod + 3)` bars. At the defaults this is 17 bars, but meeting that minimum does not guarantee an eligible pivot or a qualifying signal. A complete preceding volatility window and the required pivot-confirmation history must be available for each candidate candle.
| |||
| |||
The published releases are also available in [MT4 Code Base](https://www.mql5.com/en/code/79545) and [MT5 Code Base](https://www.mql5.com/en/code/79546). For the platform workflow, see the official [MetaEditor compilation guide](https://www.metatrader5.com/en/metaeditor/help/development/compile) and [folder structure reference](https://www.metatrader5.com/en/metaeditor/help/structure).
| |||
| |||
## Reading the chart
| |||
| |||
| Element | Meaning |
| |||
| --- | --- |
| |||
| Green arrow below a candle | The closed candle met the bullish sweep conditions. |
| |||
| Red arrow above a candle | The closed candle met the bearish sweep conditions. |
| |||
| Dotted high/low reference levels | Eligible swing levels used as price references. |
| |||
| Dashboard | Symbol, timeframe, reference levels, and the most recent signal found in the scanned history. |
| |||
| |||
The indicator calculates from the attached chart's open, high, low, and close prices. A swing high or low is a proxy for a location that may attract trading interest; the indicator has no information about actual resting orders or the location of other traders' stops.
| |||
| |||
Arrow placement includes an offset beyond the candle. Its plotted price is a visual marker, not an entry, stop-loss, or profit-target price.
| |||
| |||
Reference levels are calculated for individual bars. The current unfinished bar extends the eligible levels without receiving a signal arrow. During normal operation, calculations update when a new bar starts; history rebuilds are handled separately. The dashboard's level values come from the current bar's reference buffers.
| |||
| |||
## Signal calculation
| |||
| |||
### 1. Confirm a swing before the signal candle
| |||
| |||
`SwingStrength` sets the number of candles on each side of a candidate pivot. At the default value of `3`, the newer three confirmation candles must have closed before the pivot is eligible for a subsequent signal.
| |||
| |||
A swing high must be strictly higher than its newer neighbours and at least as high as its older neighbours within that strength window. A swing low must be strictly lower than its newer neighbours and at least as low as its older neighbours. Thus a tie on the older side is permitted, while a tie on the newer side disqualifies that pivot.
| |||
| |||
The indicator searches for the nearest eligible high and low within `MaxSwingAge`. It does not use the unfinished candle to confirm a swing or place a signal arrow. The signal candle itself is not one of the newer bars used to confirm its reference pivot.
| |||
| |||
The reference is selected before the sweep conditions are evaluated. If the candidate candle fails against that selected reference, the calculation does not retry the signal against progressively older pivots.
| |||
| |||
With `RequireFreshLevel = true`, the interval between the pivot and the signal is checked for an earlier penetration. A touch is allowed. The implementation uses a tolerance of `0.01 × _Point`: an intervening high above the swing high plus that tolerance, or an intervening low below the swing low minus that tolerance, disqualifies the corresponding reference. Disabling the freshness filter permits previously penetrated levels to remain candidates.
| |||
| |||
### 2. Calculate the sweep threshold
| |||
| |||
For a candidate candle with open `O`, high `H`, low `L`, and close `C`:
| |||
| |||
```text
| |||
RequiredSweep = max(
| |||
MinSweepPoints × _Point,
| |||
MinSweepVolRatio × PrecedingMeanTrueRange
| |||
)
| |||
```
| |||
| |||
`_Point` is the symbol's quoted point size. The preceding mean true range is the simple arithmetic mean over `VolatilityPeriod` earlier candles, excluding the signal candle. Each true range is the greatest of the candle's high-low range, the absolute difference between its high and the previous chronological close, and the absolute difference between its low and that close.
| |||
| |||
The implementation uses this simple mean of true ranges; it does not use Wilder's smoothed ATR.
| |||
| |||
### 3. Apply the directional conditions
| |||
| |||
Let `SwingLow` and `SwingHigh` be the eligible reference levels. For a non-zero candle range `R = H − L`, the following conditions must all pass for the relevant direction:
| |||
| |||
| Condition | Bullish sweep | Bearish sweep |
| |||
| --- | --- | --- |
| |||
| Penetration | `L < SwingLow − RequiredSweep` | `H > SwingHigh + RequiredSweep` |
| |||
| Close back across the reference | `C > SwingLow` | `C < SwingHigh` |
| |||
| Rejection wick | `100 × (min(O, C) − L) / R ≥ MinWickPercent` | `100 × (H − max(O, C)) / R ≥ MinWickPercent` |
| |||
| Closing position | `100 × (C − L) / R ≥ MinCloseLocationPct` | `100 × (H − C) / R ≥ MinCloseLocationPct` |
| |||
| If `RequireCandleColor = true` | `C > O` | `C < O` |
| |||
| |||
Penetration and the close back across the swing are **strict** comparisons. A price exactly on the threshold or a close exactly on the reference does not pass. Wick and closing-position percentages may equal their configured minimums; their comparisons allow a numerical tolerance of `1e-9` percentage points.
| |||
| |||
The defaults require a wick of at least 25% of the range and a closing position of at least 60%. That places a bullish close in the upper 40% of its candle, and a bearish close in the lower 40%. With the default candle-color filter disabled, the body color alone does not decide whether a signal qualifies.
| |||
| |||
Zero-range candles are rejected. If a candle qualifies in both directions, it is skipped. No signal arrow is placed on the unfinished candle.
| |||
| |||
### Worked threshold example
| |||
| |||
Assume the following values for a five-decimal EURUSD quote:
| |||
| |||
| Item | Value |
| |||
| --- | --- |
| |||
| Symbol point | `0.00001` |
| |||
| `MinSweepPoints` | `12` |
| |||
| Preceding mean true range | `0.00100` |
| |||
| `MinSweepVolRatio` | `0.10` |
| |||
| Eligible swing low | `1.10000` |
| |||
| |||
The fixed component is `12 × 0.00001 = 0.00012`. The volatility component is `0.10 × 0.00100 = 0.00010`. The required penetration is the larger value, `0.00012`.
| |||
| |||
A bullish candidate must therefore have a low **below `1.09988`**, close **above `1.10000`**, and pass the remaining filters. A low exactly at `1.09988` is insufficient. This is an arithmetic illustration, not a market forecast or a recorded trade.
| |||
| |||
On this example quote, 12 points are commonly 1.2 pips. Other instruments and quote formats use different point specifications; check the symbol's specification before applying a pip-based interpretation.
| |||
| |||
## Inputs and defaults
| |||
| |||
### Signal and calculation settings
| |||
| |||
| Input | Default | Purpose |
| |||
| --- | --- | --- |
| |||
| `SwingStrength` | `3` | Number of confirmation candles on each side of a pivot. |
| |||
| `MaxSwingAge` | `100` bars | Maximum bar distance from the candidate signal to its reference pivot. |
| |||
| `MaxBarsToScan` | `1000` bars | Bounds the closed-candle history calculated and displayed. |
| |||
| `MinSweepPoints` | `12` points | Fixed component of the minimum penetration. |
| |||
| `VolatilityPeriod` | `14` bars | Number of preceding true ranges in the simple average. |
| |||
| `MinSweepVolRatio` | `0.10` | Multiplier for the mean true range component of the sweep threshold. |
| |||
| `MinWickPercent` | `25.0` | Minimum rejection wick as a percentage of the candidate candle's range. |
| |||
| `MinCloseLocationPct` | `60.0` | Minimum close position measured from the low for bullish signals, or from the high for bearish signals. |
| |||
| `RequireFreshLevel` | `true` | Reject references that have already been penetrated, subject to the small point tolerance described above. |
| |||
| `RequireCandleColor` | `false` | If enabled, require close above open for bullish signals and below open for bearish signals. |
| |||
| |||
Start with the defaults to understand the calculation. Change one input at a time and compare the same symbol, timeframe, and history. The defaults do not establish an optimal configuration for any market.
| |||
| |||
### Display settings
| |||
| |||
| Input | Default | Purpose |
| |||
| --- | --- | --- |
| |||
| `ShowLiquidityLevels` | `true` | Display the dotted reference levels. |
| |||
| `ShowDashboard` | `true` | Display the information panel. |
| |||
| `ArrowPaddingPoints` | `8` points | Fixed component of arrow spacing beyond the candle. |
| |||
| `ArrowOffsetVolRatio` | `0.18` | Mean true range multiplier for arrow spacing; the larger fixed or volatility offset is used. |
| |||
| `DashboardInstanceId` | `A` | Instance identifier, 1–40 characters. Use a different value for every copy on the same chart. |
| |||
| `DashboardTextColor` | `clrDodgerBlue` | Dashboard text color, shown as DodgerBlue in the terminal. |
| |||
| `DashboardX` | `15` pixels | Horizontal dashboard offset from the left edge. |
| |||
| `DashboardY` | `30` pixels | Vertical dashboard offset from the top edge. |
| |||
| |||
For two copies on one chart, use different instance IDs such as `A` and `B`, and separate `DashboardY` positions. This keeps the instances' chart objects distinct and their panels readable.
| |||
| |||
### Notification settings
| |||
| |||
| Input | Default | Purpose |
| |||
| --- | --- | --- |
| |||
| `AlertPopup` | `false` | Terminal popup notification. |
| |||
| `AlertSound` | `false` | Play `alert.wav`. |
| |||
| `AlertPush` | `false` | Use the terminal's configured push notifications. |
| |||
| |||
Push notifications require the terminal's notification settings to be configured. Enabling the indicator input alone does not configure the terminal or a mobile device.
| |||
| |||
### Accepted input ranges
| |||
| |||
The source validates the following bounds when the indicator starts. Invalid values cause initialization to fail with `SLH: invalid input parameters` in the terminal log.
| |||
| |||
| Input or group | Accepted values |
| |||
| --- | --- |
| |||
| `SwingStrength` | Integer from `1` to `20`. |
| |||
| `MaxSwingAge` | Integer from `SwingStrength + 1` to `2000`. |
| |||
| `MaxBarsToScan` | Integer from `50` to `10000`. |
| |||
| `VolatilityPeriod` | Integer from `2` to `500`. |
| |||
| `MinSweepPoints`, `ArrowPaddingPoints` | Non-negative integers. |
| |||
| `MinSweepVolRatio`, `ArrowOffsetVolRatio` | Finite, non-negative numbers. |
| |||
| `MinWickPercent`, `MinCloseLocationPct` | Finite numbers from `0` to `100`. |
| |||
| `DashboardX`, `DashboardY` | Non-negative integers. |
| |||
| `DashboardInstanceId` | Between `1` and `40` characters. |
| |||
| |||
## Indicator buffers
| |||
| |||
For developers reading the indicator's buffers, the indexes are the same in both editions:
| |||
| |||
| Index | Buffer | Value when present |
| |||
| --- | --- | --- |
| |||
| `0` | `BullSignal` | Bullish arrow price, below the candle by the configured visual offset. |
| |||
| `1` | `BearSignal` | Bearish arrow price, above the candle by the configured visual offset. |
| |||
| `2` | `BuySideLevel` | Eligible swing-high reference. |
| |||
| `3` | `SellSideLevel` | Eligible swing-low reference. |
| |||
| |||
An absent value is `EMPTY_VALUE`. The unfinished bar has no bullish or bearish arrow value. Use a completed bar when examining signals, and distinguish the arrow's offset price from the actual swing reference and candle prices.
| |||
| |||
## Alert timing
| |||
| |||
Alerts are checked during a normal update in which exactly one new candle has closed. The indicator uses that closed candle's time to suppress duplicate notifications.
| |||
| |||
Initial attachment, a history reset, or a catch-up update spanning multiple candles does not trigger a batch of historical alerts. Historical arrows may therefore be visible without a corresponding notification. The dashboard's latest historical signal also does not imply that an alert was sent for it.
| |||
| |||
## Historical examples and the educational post
| |||
| |||
The repository includes two existing chart screenshots:
| |||
| |||
| Screenshot | Context |
| |||
| --- | --- |
| |||
| [MT4 bullish example](../assets/images/slh-mt4-bullish.png) | EURUSD H4; the visible date labels cover part of September 2026. The dashboard reports a later signal from the scanned history. |
| |||
| [MT5 bearish example](../assets/images/slh-mt5-bearish.png) | EURUSD H1; the visible date labels cover part of August 2024. |
| |||
| |||
The date labels describe the visible historical context. They do not establish the screenshot capture date or the exact boundaries of all visible candles.
| |||
| |||
The dashboard searches the calculation window for the latest signal, so its timestamp may differ from the historical candles visible on screen. A screenshot illustrates indicator output; it does not establish execution, trading performance, or what happened after every signal.
| |||
| |||
The published [EURUSD H4 educational review](https://www.metatrader.com/en/ideas/charts/currencies/jqff3r) uses an attached native MetaTrader.com chart for price context. Its Smart Liquidity Hunter discussion refers to a separate historical MT4 screenshot. The web chart should not be interpreted as an installation of this indicator.
| |||
| |||
## Reviewing a setup
| |||
| |||
The following is a manual review process. These steps are separate from the indicator's signal filters.
| |||
| |||
1. Record the signal candle's timestamp, swing reference, and candle high and low.
| |||
2. Review the surrounding trend and nearby structure. A rejection candle can occur while the broader move continues in the opposite direction.
| |||
3. Define what subsequent price action would support your interpretation and what would invalidate it. For example, the published bullish review considers whether later candles hold above the reclaimed level and close above the sweep candle's high. That follow-through is not an automatic Smart Liquidity Hunter condition.
| |||
4. Assess spread, commission, execution assumptions, and exposure separately before deciding whether a trade plan is usable.
| |||
5. Keep a record of what actually follows, including failed examples. Use the same rules when comparing observations.
| |||
| |||
For reproducibility, record the platform and build, broker/server, complete symbol name, timeframe, inputs, available history, and candle timestamps in the terminal's time basis. Different feeds, candle boundaries, or inputs can change the result.
| |||
| |||
## Closed candles, history, and limitations
| |||
| |||
Signals are calculated from closed candles using pivots already confirmed before the signal candle. This avoids provisional signal arrows on the unfinished candle. It is not an unconditional guarantee that historical output will remain identical forever.
| |||
| |||
History corrections, input changes, and changes in the loaded or scanned history can alter the displayed results. As the chart advances, older signals fall outside `MaxBarsToScan`. Swing confirmation also creates an intentional delay before a reference can be used.
| |||
| |||
The indicator does not:
| |||
| |||
- read an order book or identify actual resting stop-loss orders;
| |||
- place, modify, or close trades;
| |||
- automatically apply the manual follow-through framework in the educational review;
| |||
- recommend an entry, stop, target, or position size;
| |||
- establish a win rate or future profitability from its arrows or screenshots.
| |||
| |||
## Troubleshooting
| |||
| |||
| Observation | What to check |
| |||
| --- | --- |
| |||
| Indicator is absent from Navigator | Confirm the source is in the correct terminal data folder, compile it in the matching MetaEditor, and refresh Navigator. |
| |||
| Indicator fails to initialize | Check the terminal log and the accepted input ranges above. |
| |||
| No arrows appear | Check compilation and loaded history. No candle in the calculation window may pass every enabled filter. A level crossing alone is insufficient. |
| |||
| A potential swing is not used immediately | Allow the required newer confirmation candles to close. The pivot must be confirmed before the candidate signal candle. |
| |||
| A touch produces no signal | A sweep must exceed the required penetration strictly and close back across the reference; wick and close-position filters still apply. |
| |||
| Old arrows disappear | Check whether they have left `MaxBarsToScan` or whether history or inputs changed. |
| |||
| Dashboard time does not match the visible example | The latest signal in scanned history may be outside the visible chart window. |
| |||
| Multiple dashboards overlap | Give each instance a different `DashboardInstanceId` and adjust the panel positions. |
| |||
| Historical arrows produce no alerts | Initial attachment, resets, and catch-up batches intentionally suppress historical notifications. |
| |||
| Push messages do not arrive | Check `AlertPush`, the terminal's notification configuration, and whether a qualifying normal one-candle update occurred. |
| |||
| |||
When requesting help, include the exact source version, platform build, broker/server, symbol, timeframe, inputs, and reproducible candle time. Describe what you expected and what you observed. Exclude credentials and private account details.
| |||
| |||
## Reference links
| |||
| |||
- [MT4 release and source — MQL5 Code Base 79545](https://www.mql5.com/en/code/79545)
| |||
- [MT5 release and source — MQL5 Code Base 79546](https://www.mql5.com/en/code/79546)
| |||
- [Illustrated function and setup guide — ForexSignal24](https://forexsignal24.com/smart-liquidity-hunter)
| |||
- [Historical EURUSD H4 educational review — MetaTrader.com](https://www.metatrader.com/en/ideas/charts/currencies/jqff3r)
| |||
| |||
The indicator source is the reference for executable behaviour. The linked educational review adds a manual interpretation framework; it does not change the indicator's rules.
|