OPEN-SOURCE SCRIPT
已更新 Liquidity Geography Sweep and Gap Strategy (Swing)

A swing strategy built on liquidity geography. It trades stop-run reversals (liquidity sweeps) and range gap-fills, and draws the price-only terrain those moves react to.
A sweep is detected when price pierces the latest confirmed swing pivot (the active liquidity pool) and closes back inside. The stop sits just beyond the swept extreme plus an ATR buffer, and the target is a risk-reward multiple or the opposite pool. The gap module fades range gaps back to the prior close and skips trending sessions using an EMA-travel filter.
Optional filters, each individually toggleable so you can switch them off to A/B test:
Regime filter: fade sweeps only in balance, follow only with the higher-timeframe trend. On by default.
Confluence: require the swept level to stack with a prior-day extreme or round number. Off by default.
Risk-based position sizing: risk a fixed percent of equity per trade. Off by default.
The defaults reflect backtesting on a single instrument, not theory. Only the regime filter improved results. Re-test on your own symbol before trusting any default.
Drawing layers, with terrain off by default for a clean chart: prior-day high and low, round numbers, Fair Value Gaps, premium and discount with OTE, order blocks, market structure, the active pivot pool, a higher-timeframe bias line with trend-regime shading, and entry, stop and target lines while a position is open.
Scope: price data only. Volume profile, order-flow delta and positioning data such as short interest, futures and options open interest are out of scope. Use dedicated tools for those.
Daily timeframe. Set commission and slippage to realistic costs before relying on any result. This is an educational tool, not financial advice. Past backtest results do not guarantee future performance.
A sweep is detected when price pierces the latest confirmed swing pivot (the active liquidity pool) and closes back inside. The stop sits just beyond the swept extreme plus an ATR buffer, and the target is a risk-reward multiple or the opposite pool. The gap module fades range gaps back to the prior close and skips trending sessions using an EMA-travel filter.
Optional filters, each individually toggleable so you can switch them off to A/B test:
Regime filter: fade sweeps only in balance, follow only with the higher-timeframe trend. On by default.
Confluence: require the swept level to stack with a prior-day extreme or round number. Off by default.
Risk-based position sizing: risk a fixed percent of equity per trade. Off by default.
The defaults reflect backtesting on a single instrument, not theory. Only the regime filter improved results. Re-test on your own symbol before trusting any default.
Drawing layers, with terrain off by default for a clean chart: prior-day high and low, round numbers, Fair Value Gaps, premium and discount with OTE, order blocks, market structure, the active pivot pool, a higher-timeframe bias line with trend-regime shading, and entry, stop and target lines while a position is open.
Scope: price data only. Volume profile, order-flow delta and positioning data such as short interest, futures and options open interest are out of scope. Use dedicated tools for those.
Daily timeframe. Set commission and slippage to realistic costs before relying on any result. This is an educational tool, not financial advice. Past backtest results do not guarantee future performance.
版本注释
A swing strategy built on liquidity geography. It trades stop-run reversals (liquidity sweeps) and range gap-fills, and marks every detected sweep on the chart as a stop hunt.A sweep is detected when price pierces the active liquidity pool and closes back inside. The pool is switchable: the latest confirmed swing pivot (default), or the prior N-day high and low, a rolling range in the spirit of the classic Turtle Soup setup. The stop sits just beyond the swept extreme plus an ATR buffer, and the target is a risk-reward multiple or the opposite pool. The gap module fades range gaps back to the prior close and skips trending sessions using an EMA-travel filter.
Stop-hunt markers: each detected sweep is flagged with a cross below the bar when a low is swept and above the bar when a high is swept. Because the markers follow whichever pool source is selected, switching the source lets you compare what each definition flags.
Optional filters, each individually toggleable so you can switch them off to A and B test:
Regime filter: fade sweeps only in balance, follow only with the higher-timeframe trend. On by default.
Confluence: require the swept level to stack with a prior-day extreme or round number. Off by default.
Risk-based position sizing: risk a fixed percent of equity per trade. Off by default.
These defaults reflect backtesting, not theory. Only the regime filter improved results on the instruments tested, so the other two ship off. Re-test on your own symbol before trusting any default.
This setup needs a market that swings. It performs poorly in strong one-way trends, where reversals get run over, and best in ranging names that repeatedly probe and reject their highs and lows. Match the symbol to the method.
Drawing layers are off by default for a clean chart and can each be turned on: prior-day high and low, round numbers, Fair Value Gaps, premium and discount with OTE, order blocks, market structure, the active pool line, a higher-timeframe bias line with trend-regime shading, and entry, stop and target lines while a position is open.
Scope: price data only. Volume profile, order-flow delta and positioning data such as short interest, futures and options open interest are out of scope. Use dedicated tools for those.
Daily timeframe. Set commission and slippage to realistic costs before relying on any result. This is an educational tool, not financial advice. Past backtest results do not guarantee future performance.
版本注释
A swing strategy built on liquidity geography. It trades stop-run reversals (liquidity sweeps) and range gap-fills, and marks every detected sweep on the chart as a stop hunt.A sweep is detected when price pierces the active liquidity pool and closes back inside. The pool is switchable: the latest confirmed swing pivot (default), or the prior N-day high and low, a rolling range in the spirit of the classic Turtle Soup setup. The stop sits just beyond the swept extreme plus an ATR buffer, and the target is a risk-reward multiple or the opposite pool. The gap module fades range gaps back to the prior close and skips trending sessions using an EMA-travel filter.
Stop-hunt markers: each detected sweep is flagged with a cross below the bar when a low is swept and above the bar when a high is swept. Because the markers follow whichever pool source is selected, switching the source lets you compare what each definition flags.
Optional filters, each individually toggleable so you can switch them off to A and B test:
Regime filter: fade sweeps only in balance, follow only with the higher-timeframe trend. On by default.
Confluence: require the swept level to stack with a prior-day extreme or round number. Off by default.
Risk-based position sizing: risk a fixed percent of equity per trade. Off by default.
These defaults reflect backtesting, not theory. Only the regime filter improved results on the instruments tested, so the other two ship off. Re-test on your own symbol before trusting any default.
This setup needs a market that swings. It performs poorly in strong one-way trends, where reversals get run over, and best in ranging names that repeatedly probe and reject their highs and lows. Match the symbol to the method.
Drawing layers are off by default for a clean chart and can each be turned on: prior-day high and low, round numbers, Fair Value Gaps, premium and discount with OTE, order blocks, market structure, the active pool line, a higher-timeframe bias line with trend-regime shading, and entry, stop and target lines while a position is open.
Scope: price data only. Volume profile, order-flow delta and positioning data such as short interest, futures and options open interest are out of scope. Use dedicated tools for those.
Daily timeframe. Set commission and slippage to realistic costs before relying on any result. This is an educational tool, not financial advice. Past backtest results do not guarantee future performance.
版本注释
Liquidity Geography Strategy is a price-only swing strategy that trades two setups around liquidity levels. The Sweep module looks for a stop run beyond a liquidity pool (the latest confirmed swing pivot, or a rolling N-day high/low) followed by a close back inside, then enters the reversal with a stop just past the swept extreme. The Gap-Fill module fades opening gaps back toward the prior close inside ranges. Only one position is held at a time. Several literature-driven filters can each be toggled to A/B test their effect: a Tier 1 regime filter that fades sweeps in balance but only follows them with the higher-timeframe trend, a Tier 2 confluence filter requiring the swept level to stack with a prior-day extreme or round number, Tier 3 risk-based position sizing, and a Tier 4 higher-timeframe directional bias. By default the chart shows only entries, exits, and the open trade's levels; the full terrain drawing (prior-day high/low, round numbers, Fair Value Gaps, premium/discount with OTE, order blocks, market structure, and the liquidity pool) can be switched on from the inputs. Scope is price data only; volume profile, order-flow delta, and positioning data are out of scope. Built on public liquidity/ICT-style concepts and implemented from scratch in original Pine. Backtest defaults use 10 percent of equity per trade, 0.1 percent commission, and 2 ticks of slippage; set these to your real costs and re-test on your own symbol before trusting any result. Past performance does not guarantee future results.版本注释
Liquidity Geography Strategy is a price-only swing strategy that trades two setups around liquidity levels. The Sweep module looks for a stop run beyond a liquidity pool (the latest confirmed swing pivot, or a rolling N-day high/low) followed by a close back inside, then enters the reversal with a stop just past the swept extreme and a target set by risk:reward. The Gap-Fill module fades opening gaps back toward the prior close inside ranges. Only one position is held at a time; on a same-bar tie the Gap module takes priority. Several literature-driven filters can each be toggled to A/B test their effect: a Tier 1 regime filter that fades sweeps in balance but only follows them with the higher-timeframe trend, a Tier 2 confluence filter requiring the swept level to stack with a prior-day extreme or round number, Tier 3 risk-based position sizing, and a Tier 4 higher-timeframe directional bias. By default the chart shows only entries, exits, and the open trade's levels; the full terrain drawing (prior-day high and low, round numbers, Fair Value Gaps, premium/discount with OTE, order blocks, market structure, and the liquidity pool) can be switched on from the inputs. Scope is price data only; volume profile, order-flow delta, and positioning data are out of scope. Built on public liquidity and ICT-style concepts, implemented from scratch in original Pine. Backtest defaults use 10 percent of equity per trade, 0.1 percent commission, and 2 ticks of slippage; set these to your real costs and re-test on your own symbol before trusting any result. Past performance does not guarantee future results. This is for education and research, not financial advice.开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。