Liquidity Sweeps — evidence-bounded algorithm & code
Owner's internal “V2 indicator” label, cross-checked against the X thread mirror and the public Liquidity Sweeps [LuxAlgo] Pine v5 script. This report does not modify server.js or the FTNN tap.
Findings
Only Wicks, with Swings=5.- The mirrored X conversation names Liquidity Sweeps [LuxAlgo] on TradingView. It separately gives a simple entry rule: long after a prior low is wicked through and the candle closes back above it; short is the mirror. A stop is placed beyond the sweep extreme, with no numeric buffer or target specified.
- The official Pine v5 implementation is publicly available as an open-source TradingView script, version
1.0, under CC BY-NC-SA 4.0. “V2” is the Owner's task label; it is not the script's name/version in the post or source. - Direct algorithm inputs are
high,low, andclose, plus internalbar_indexfor state/age. The source does not read open, volume, tick trades, order book, or Level 2. “Liquidity” is inferred from price levels; the indicator does not observe resting stops. - The captured thread does not say TeamViewer. Its final post promotes a separate EA via the profile's LINE registration path. That offer's actual delivery was not tested.
Important source-time discrepancy
2026-11-19 17:00:19 UTC (= 2026-11-20 02:00:19 JST). The system date for this work is 2026-11-18 Asia/Tokyo. Therefore this content is recorded as a mirror-returned payload with an unresolved future timestamp, not as a post independently confirmed to have been publicly available by the system date. The 2024 LuxAlgo source page and source endpoint are independently available and are not affected by this discrepancy.The exact post/thread content and images below are preserved for audit. Do not use the future-dated X payload as proof of contemporaneous publication or performance.
Post author, text, and chart content
| Mirror identity | Display name べーた; handle @foodloss_otoko. The mirror profile self-describes as a full-time trader using EA and discretionary trading. Identity/profile claims are mirror-reported, not independently authenticated. |
|---|---|
| Original post text (Japanese) | マジで全トレーダーに「Liquidity Sweeps」を使ってほしい。 |
| Faithful translation | “I really want every trader to use ‘Liquidity Sweeps.’ It instantly shows places where you think, ‘that wasn’t a breakout, it was a fake-out.’ I’ve used it for a long time; if this alone can make +1,000,000 yen a month, even a beginner could seriously do it. Here is how to use it…” The monthly-income claim is promotional and unverified. |
| Thread instructions |
|
Captured media SHA-256:
be3e96fa4b0fe04efd299be468d02fcbd3ac43c001f024343a30925bf3e37c24Captured media SHA-256:
96ac4f2d4bc696c82d4bbb3ced2abfe24a35e10d3a816a37ac7f46a5c10ca8a8Captured media SHA-256:
4212a20743e3672f6e167cb33c18d3193fd4d3ae427f41243cd6b6074b8e497aImage notes: the first screenshot shows sweep labels/levels on a chart (visible price scale roughly 4,120–4,220 and date marks 10/5–10/7; no readable symbol). The other two are explanatory long/short diagrams, not an independently identified live instrument or verified backtest.
Full calculation logic
Let Hₜ, Lₜ, Cₜ be the current bar's high, low, and close, and Q an active confirmed pivot level.
1 · Confirm swing levels
- Default
len = 5. Pine callsta.pivothigh(len, len)andta.pivotlow(len, len). A candidate pivot is confirmed only after the five bars to its right exist; the pivot is stored atbar_index - len. - Each level tracks whether it is broken, mitigated, already wick-swept, or already taken. Levels are removed if mitigated/taken or older than 2,000 bars. The line is anchored to the historical pivot bar after confirmation.
- The built-in Pine pivot's equal-high/equal-low tie behavior is not reimplemented here; use TradingView's source for exact platform semantics.
2 · Default mode: Only Wicks
| Signal | Strict trigger on a bar close | Zone drawn by source |
|---|---|---|
Bullish wick sweep of a pivot low Q | Lₜ < Q AND Cₜ > Q, while the level is active and not previously wick-swept | Between the sweep low Lₜ and level Q; teal/green in source defaults |
Bearish wick sweep of a pivot high Q | Hₜ > Q AND Cₜ < Q, while the level is active and not previously wick-swept | Between level Q and sweep high Hₜ; red in source defaults |
A close beyond the level invalidates that level in Only Wicks mode. Conditions are strict: equality alone does not trigger. No volume or wick-size threshold is applied.
3 · Other published modes
- Only Outbreaks & Retest: direct same-bar wick sweeps are disabled. A close beyond a pivot first marks it broken. Later, a high pivot can trigger bullish retest when
Lₜ < Q AND Cₜ > Q; a low pivot can trigger bearish retest whenHₜ > Q AND Cₜ < Q. A close back through the level mitigates the tracked level. - Wicks + Outbreaks & Retest: both event types are enabled. The direct wick markers use dotted styling; breakout/retest markers use dashed styling.
4 · Sweep-area lifecycle
- Default
Extend = true,Max bars = 300. The box spans the liquidity level and the wick extreme. - A bullish low-sweep box stops extending if a later close falls below its bottom; a bearish high-sweep box stops if a later close exceeds its top. Otherwise it stops at the configured bar limit.
- The LuxAlgo script is a visual indicator, not a backtested strategy: it does not set a profit target, position size, numeric stop buffer, or trade outcome.
Independent translation of the X thread's entry rule
def x_thread_entry(side, level, high, low, close, bar_closed):
"""Boolean trigger only; not a complete trading strategy."""
if not bar_closed:
return False
if side == "long":
return low < level and close > level
if side == "short":
return high > level and close < level
raise ValueError("side must be 'long' or 'short'")
This tiny function is only a literal translation of the author's described entry test. It does not choose the pivot, reproduce LuxAlgo state, or define the unspecified stop buffer/target. The exact LuxAlgo source follows below.
Data inputs — OHLCV question
| Input | Needed by published LuxAlgo source? | Reason / source |
|---|---|---|
| High | Yes | Pivot highs; upper wick sweeps; retest conditions. |
| Low | Yes | Pivot lows; lower wick sweeps; retest conditions. |
| Close | Yes | Determines reclaim, breakout, mitigation, and retest. |
| Open | No | Not read by the source. “Body closes back” is operationalized by close, not candle color/open. |
| Volume | No | No volume series or volume filter appears in the source. |
| Tick / order book / Level 2 | No | Not read. The term “liquidity” is a price-action proxy from historical swing levels. |
| bar_index | Internal only | Stores pivot location and expiry/extension age; it is the chart's bar sequence, not another market feed. |
Where is the code? TeamViewer check
- Verified source: TradingView labels the script “OPEN-SOURCE SCRIPT”; the official Pine facade returns
scriptAccess=open_no_auth, titleLiquidity Sweeps [LuxAlgo], version1.0, language@version=5. The source is available at the official URL below. - TeamViewer: no TeamViewer download, session, repository, or handoff appears in the captured X conversation. No TeamViewer access was attempted. Thus “code can be obtained through TeamViewer” is unverified.
- The separate EA promotion says profile link → LINE registration. That is not evidence that the indicator source or EA is delivered, and no LINE registration/download was attempted.
- The published Pine source carries CC BY-NC-SA 4.0. Preserve attribution; adaptations must comply with the same license and non-commercial restriction. Do not assume that license permits commercial Futu deployment.
Futu / FTNN boundary — no implementation change made
- The verified A35 FTNN tap captures K-line pushes/responses. Previously decoded K-line fields map to open=4, high=5, low=6, close=3 (price values scaled by
1e9); volume is field 7 but is not needed for this indicator. - Exact replication needs a rolling history and persistent pivot state: the default pivot confirms five bars late and the source tracks active levels for up to 2,000 bars. A35's
latest_state.jsonretains only the latest bar per symbol/timeframe, so that file alone is insufficient. Rawkline_feed.jsonl/historical responses would be needed for a non-repainting stateful implementation. - No changes were made to
server.js, FTNN, the tap, or the bridge. No Owner Oracle A1 test, quote-header capture, Tick decoding, or live chart test was performed. No OpenD is used or proposed. - Before any future Futu integration: validate the pivot/tie behavior against TradingView with fixed historical bars, preserve close-confirmation timing, and do not use the signals as automated execution input without independent risk controls.
Evidence and source links
- Third-party rendered X conversation — root post + replies + three images; mirror-reported publication time is future-dated as noted above. Captured bytes SHA-256:
20df1576454fd0f7e89dbe6e769e1fabc64f193edf371a266c60440d2d2bf541. - FxTwitter API mirror — root text, author metadata, and timestamp; raw JSON SHA-256:
37729c68533ec18ee6bdd5d856f90a86ad876ef4369fa92577e1eb10f1d42407. - TradingView: Liquidity Sweeps [LuxAlgo] — official description, settings, open-source label, and comments; page capture SHA-256:
e597dd9325fdf007472a075552c2761b960641bc53c4ddfc5b6a8e180e24cf81. - TradingView Pine facade: official source, PUB;26391b932d3145879b67deca62305c9a / last —
open_no_auth, version 1.0; raw JSON SHA-256:a5ea0e319e02c767db912cd3a2421117b5a9534bc1a7e7f52f12c0b73fb2fcae; extracted source SHA-256:18be09f34ebf371e4cc8997ba77c29cc1ada4612a5529a79994694ec9b6ba12d. - CC BY-NC-SA 4.0 license (as stated in the Pine source header).
Source scope: statements about LuxAlgo implementation are based on the retrieved official Pine source; statements about the trading recipe are based on the mirror-rendered X thread; source-time anomaly, marketing claims, TeamViewer, and actual EA delivery remain explicitly qualified.
Exact public Pine source (unmodified)
Expand complete Pine Script source
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo
//@version=5
indicator( 'Liquidity Sweeps [LuxAlgo]'
, 'LuxAlgo - Liquidity Sweeps'
, max_lines_count=500
, max_boxes_count=500
, overlay=true
)
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
len = input.int(5, 'Swings', minval=1, group='Liquidity Sweeps')
opt = input.string('Only Wicks', 'options'
, options=['Only Wicks', 'Only Outbreaks & Retest', 'Wicks + Outbreaks & Retest'], group='Liquidity Sweeps')
colBl = input.color(#089981, 'Bull ', group='Liquidity Sweeps', inline='c1')
colBr = input.color(#f23645, 'Bear' , group='Liquidity Sweeps', inline='c2')
colBl2 = input.color(#08998180, '' , group='Liquidity Sweeps', inline='c1')
colBr2 = input.color(#f2364580, '' , group='Liquidity Sweeps', inline='c2')
extend = input.bool(true, 'Extend', group='Sweep Area')
maxB = input.int(300, 'Max bars', minval=1, maxval=5000, group='Sweep Area')
colBl3 = input.color(#08998141, 'Bull ', group='Sweep Area')
colBr3 = input.color(#f2364541, 'Bear' , group='Sweep Area')
oW = opt == 'Only Wicks'
oO = opt == 'Only Outbreaks & Retest'
WO = opt == 'Wicks + Outbreaks & Retest'
n = bar_index
//-----------------------------------------------------------------------------}
//UDT's
//-----------------------------------------------------------------------------{
type piv
float prc // price
int bix // bar_index
bool brk // broken
bool mit // mitigated
bool tak // taken
bool wic // wick
line lin
type boxBr
box bx
line ln
bool br
int dr
//-----------------------------------------------------------------------------}
//Variables
//-----------------------------------------------------------------------------{
var array< piv >aPivH = array.new< piv >(1, piv.new ())
var array< piv >aPivL = array.new< piv >(1, piv.new ())
var array<boxBr>aBoxBr = array.new<boxBr>(1, boxBr.new())
//-----------------------------------------------------------------------------}
//Methods - functions
//-----------------------------------------------------------------------------{
method n(float piv) => bool out = not na(piv)
method p(piv piv, float val) => float out = (100 / piv.prc * val) - 100
method l(piv get, color c, string s='sd') =>
style = switch s
'dt' => line.style_dotted
'ds' => line.style_dashed
=> line.style_solid
line.new(get.bix, get.prc, n, get.prc, color=c, style = style)
method br(piv get, color c3, color c, int d) =>
y1 = d == 1 ? high : get.prc
y2 = d == 1 ? get.prc : low
boxBr.new(
box.new(n -1, y1, n +1, y2
, border_color
= color.new(
na, na )
, bgcolor=c3)
, line.new(n , y1, n, y2, color=c, width=3)
, false
, d)
lnDot(y, c) => line.new(n, y, n+3, y, color=c, style=line.style_dotted)
//-----------------------------------------------------------------------------}
//Execution
//-----------------------------------------------------------------------------{
ph = ta.pivothigh(len, len)
pl = ta.pivotlow (len, len)
if ph.n()
aPivH.unshift(piv.new(ph, n -len, false, false, false, false))
if pl.n()
aPivL.unshift(piv.new(pl, n -len, false, false, false, false))
for i = aPivH.size() -1 to 0
get = aPivH.get(i)
if not get.mit
if not get.brk
if close > get.prc
if not oW
get.brk := true
else
get.mit := true
if not oO and not get.wic
if high > get.prc and close < get.prc
aBoxBr.unshift(get.br(colBr3, colBr, 1))
get.l(colBr2, 'dt'), lnDot(low, colBr)
get.wic := true
else
if close < get.prc
get.mit := true
if not oW and low < get.prc and close > get.prc
aBoxBr.unshift(get.br(colBl3, colBl, -1))
get.l(colBl2, 'ds'), lnDot(high, colBl)
get.tak := true
if n - get.bix > 2000 or get.mit or get.tak
aPivH.remove(i).lin.delete()
for i = aPivL.size() -1 to 0
get = aPivL.get(i)
if not get.mit
if not get.brk
if close < get.prc
if not oW
get.brk := true
else
get.mit := true
if not oO and not get.wic
if low < get.prc and close > get.prc
aBoxBr.unshift(get.br(colBl3, colBl, -1))
get.l(colBl2, 'dt'), lnDot(high, colBl)
get.wic := true
else
if close > get.prc
get.mit := true
if not oW and high > get.prc and close < get.prc
aBoxBr.unshift(get.br(colBr3, colBr, 1))
get.l(colBr2, 'ds'), lnDot(low, colBr)
get.tak := true
if n - get.bix > 2000 or get.mit or get.tak
aPivL.remove(i).lin.delete()
if extend
for bx in aBoxBr
if not bx.br and n - bx.bx.get_left() -1 <= maxB
bx.bx.set_right(bar_index)
if bx.dr == -1 and close < bx.bx.get_bottom()
bx.br := true
if bx.dr == 1 and close > bx.bx.get_top ()
bx.br := true
//-----------------------------------------------------------------------------}