OPEN-SOURCE SCRIPT

Smart Wick Analyzer

264
Smart Wick Analyzer (SWA)

Purpose: Highlight potential liquidity‑grab candles (long wicks) and turn them into actionable, rule‑based buy/sell signals with trend, volume, and cooldown filters.
Type: Indicator (not a strategy). Educational tool to contextualize wick events.

🧠 What This Script Does

SWA looks for candles where the wick is large relative to its body—a common signature of liquidity sweeps / rejection. It then adds three confirmations before marking a trade signal:
1. Wick Event

Upper‑wick event (possible rejection from above)
Lower‑wick event (possible rejection from below)
• Condition: wick length > body × Wick‑to‑Body Ratio

2. Context Filters

Trend filter: closing price vs. SMA of lookbackBars
Volume filter: current volume vs. average volume × volumeThreshold

3. Signal Hygiene

Cooldown: prevents clustering; a minimum number of bars must pass before a new signal is allowed.

If a candle passes these checks:
Buy Signal (triangle up): long lower wick + price above SMA + relative‑high volume + cooldown passed
Sell Signal (triangle down): long upper wick + price below SMA + relative‑high volume + cooldown passed

The signal candle is also bar‑colored black for quick visual focus.



✳️ What the Dotted Lines Mean (including the green one)

On every signal bar the script draws two dotted horizontal levels, extended to the right:
• Open line of the signal candle
• Close line of the signal candle
• They use the signal color: green for Buy, red for Sell.

How to interpret (example: green = Buy signal):
• The green dotted close line represents the momentum validation level. If subsequent candles close above this line, it indicates follow‑through after the wick rejection (buyers defended into the close).
• The green dotted open line is a risk context / invalidation reference. If price falls back below it soon after the signal, the wick event may have failed or devolved into chop.

In your annotated chart: the candle initially looked constructive (“closing above could be positive momentum”), but later price failed and rotated down—hence a sell signal interpreted when an upper‑wick event occurred under down‑trend conditions.



⚙️ Inputs & What They Control
• Wick‑to‑Body Ratio (wickThreshold): how “extreme” a wick must be to count as a liquidity‑grab.
• Lookback Period (lookbackBars):
• SMA period for trend context
• Volume MA for relative‑volume check
• Volume Multiplier (volumeThreshold): strengthens/loosens volume confirmation.
• Cooldown Bars (cooldownBars): minimum spacing between consecutive signals.
• Enable Alerts (showAlerts): turns on alert conditions.



🔔 Alerts (exact titles)
• “SWA Buy Alert” — potential reversal / Buy signal detected
• “SWA Sell Alert” — potential reversal / Sell signal detected



📌 How to Use (practical guide)
1. Scan for the black‑colored signal candle and its dotted lines.
2. For Buy signals (green): Prefer continuation if price closes above the green close line within the next few bars. Manage risk using the open line or your own level.
3. For Sell signals (red): Prefer continuation if price closes below the red close line.
4. Avoid chasing during low‑volume / counter‑trend signals; the filters help, but structure (HTF trend, S/R, session context) still matters.
5. Use the cooldown to reduce noise on fast time frames.



✅ Why This Isn’t Just “Another Wick Indicator”
• The script does not flag every long‑wick; it requires trend alignment and relative volume to suggest participation.
• The two reference lines (open/close) provide post‑signal state tracking—a simple, visual framework to judge follow‑through vs. failure without additional tools.
• Cooldown logic discourages clustered, low‑quality repeats around the same zone.



⚠️ Notes & Limitations
• Works across markets/time frames, but wick behavior varies by instrument and session. Parameters may need adjustment.
• Signals are contextual, not guarantees. Consolidation and news spikes can invalidate wick reads.
• This indicator is not a strategy; it does not backtest performance on its own.



📄 Disclaimer

This tool is for educational purposes only and should be combined with personal analysis and risk management. Markets are uncertain; past behavior does not guarantee future results.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.