<!DOCTYPE html>
<html lang="zh-Hant"><head><meta charset="utf-8"><title>Liquidity Sweeps V2 — A90</title>
<style>body{font-family:monospace;max-width:900px;margin:20px auto;padding:0 16px;line-height:1.6}pre{background:#f4f4f4;padding:12px;overflow:auto}table{border-collapse:collapse}td,th{border:1px solid #999;padding:4px 8px}</style></head>
<body>
<h1>Liquidity Sweeps — V2 指標（算法＋編碼）</h1>
<p>Seat: A90 (A906138, 0號組) | 來源帖: X @foodloss_otoko (べーた) 2026-11-19 https://x.com/foodloss_otoko/status/2123461381030834442 | 定調: 65053 V2 指標</p>
<h2>1. 原帖（主帖原文）</h2>
<blockquote>マジで全トレーダーに「Liquidity Sweeps」を使ってほしい。「これブレイクじゃなくてダマシやん」って場所が一瞬で分かる。俺もずっと使ってるけど、これだけで月＋100万ならガチで初心者でもいけそう。具体的な使い方なんだけど、、、</blockquote>
<p>註：本席 fetch 僅取得主帖文字（279讚/28轉/3回覆），串文圖表未取得；第三方鏡像（LuxAlgo）定義作算法依據，作者自用參數未驗證。TeamViewer 取 code 之說：原文未提，未驗證。</p>
<h2>2. 算法（逐項）</h2>
<ol>
<li>Swing 偵測：ta.pivothigh(high, L, L) / ta.pivotlow(low, L, L)，L=5（可調 2-20），確認延遲 L 根。</li>
<li>流動性池：swing high = BSL（買方止損池）；swing low = SSL（賣方止損池）；等高低容差 0.2*ATR 合併；保留最近 N=30 池，水平延伸。</li>
<li>Sweep 確認（同根）：Bearish: high &gt; level AND close &lt; level；Bullish: low &lt; level AND close &gt; level。僅影線穿、收盤收回先算；收盤穿過 = 真突破，唔算 sweep。</li>
<li>深度：depth = (high-level)/ATR 或 (level-low)/ATR，ATR=ta.atr(14)；門檻 min 0.1 ATR / max 0.8 ATR。</li>
<li>風控（可選）：Entry=signal close；Long SL=sweepLow-0.25*ATR（最小距離 0.5*ATR）；TP=entry±risk*R（1/1.5/2/3）。</li>
</ol>
<h2>3. 輸入來源</h2>
<table><tr><th>輸入</th><th>來源</th><th>必要</th></tr>
<tr><td>high/low/close</td><td>單週期 K 線 OHLC</td><td>必要（核心）</td></tr>
<tr><td>open</td><td>K 線 OHLC</td><td>可選（方向過濾）</td></tr>
<tr><td>volume</td><td>K 線 Volume</td><td>可選（個別版加權，核心唔用）</td></tr>
<tr><td>ATR/EMA</td><td>由 H/L/C 衍生</td><td>衍生</td></tr>
<tr><td>訂單簿/tick/外部</td><td>—</td><td>唔需要</td></tr></table>
<h2>4. Pine Script v5 編碼（TradingView）</h2>
<pre>//@version=5
indicator("Liquidity Sweeps V2 [A90]", overlay=true)
L = input.int(5, "Swing Length", minval=2)
atrLen = input.int(14, "ATR Length")
minDepth = input.float(0.1, "Min Depth ATR")
maxDepth = input.float(0.8, "Max Depth ATR")
atr = ta.atr(atrLen)
ph = ta.pivothigh(high, L, L)
pl = ta.pivotlow(low, L, L)
var float lvlH = na
var float lvlL = na
if not na(ph)
    lvlH := ph
if not na(pl)
    lvlL := pl
bearSweep = not na(lvlH) and high &gt; lvlH and close &lt; lvlH and (high - lvlH) / atr &gt;= minDepth and (high - lvlH) / atr &lt;= maxDepth
bullSweep = not na(lvlL) and low &lt; lvlL and close &gt; lvlL and (lvlL - low) / atr &gt;= minDepth and (lvlL - low) / atr &lt;= maxDepth
plotshape(bearSweep, "Bear Sweep", shape.labeldown, location.abovebar, color.red, text="SWEEP")
plotshape(bullSweep, "Bull Sweep", shape.labelup, location.belowbar, color.green, text="SWEEP")
plot(lvlH, "BSL", color.red)
plot(lvlL, "SSL", color.green)</pre>
<h2>5. Python 參考編碼（離線驗證用）</h2>
<pre>def detect_sweeps(bars, L=5, atr_len=14, min_d=0.1, max_d=0.8):
    # bars: list of dicts with high/low/close
    # ATR (simple): mean of (high-low) over atr_len
    import statistics
    trs = [b["high"]-b["low"] for b in bars]
    atr = statistics.mean(trs[-atr_len:]) if len(trs) &gt;= atr_len else (statistics.mean(trs) if trs else 0)
    events = []
    for i in range(L, len(bars)-L):
        window = bars[i-L:i+L+1]
        if bars[i]["high"] == max(b["high"] for b in window):
            lvl = bars[i]["high"]
            for j in range(i+L+1, len(bars)):
                b = bars[j]
                if b["high"] &gt; lvl and b["close"] &lt; lvl and atr &gt; 0:
                    d = (b["high"]-lvl)/atr
                    if min_d &lt;= d &lt;= max_d:
                        events.append(("bear", j, lvl, d))
                    break
        if bars[i]["low"] == min(b["low"] for b in window):
            lvl = bars[i]["low"]
            for j in range(i+L+1, len(bars)):
                b = bars[j]
                if b["low"] &lt; lvl and b["close"] &gt; lvl and atr &gt; 0:
                    d = (lvl-b["low"])/atr
                    if min_d &lt;= d &lt;= max_d:
                        events.append(("bull", j, lvl, d))
                    break
    return events</pre>
<h2>6. 核實狀態</h2>
<ul><li>算法核心（pivot+reclaim+ATR depth）：第三方鏡像一致，已列來源。</li>
<li>作者串文參數/圖表：本席未取得，未驗證。</li>
<li>TeamViewer code：未驗證。</li>
<li>「月+100万」收益宣稱：未驗證，唔係公式。</li></ul>
<p>— A90, 0600 私檔 + filebin 公開交付（見 relay ack pointer）</p>
</body></html>
