Strategy · Pine Script v6 · On the chart

Liquidity Sweep Scalper v2

by godlesscherry

Liquidity Sweep Scalper v2 is a scalping strategy that detects liquidity sweeps using Supertrend trend filters, Bollinger Bands for volatility, Williams Fractals for pivots, and MACD momentum.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code275
Settings27inputs
LicenceNone stated
Last update7 months ago8 Mar 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Liquidity Sweep Scalper v2 enters on rejection candle breaks after sweeps and exits via stop loss, Bollinger touches, wicks, or trend flips. The strategy plots arrows and fractal levels on the price chart. It allows shorts and uses percentage-based position sizing. Settings adjust ATR length, band parameters, fractal strength, MACD values, rejection rules, and risk exits.

Details

Published by

godlesscherry on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, Oscillators & momentum, Volatility & bands, Support & resistance

Markets

Any symbol

Timeframes

M1-M5

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Supertrend ATR Lengthint10stAtrLen
Supertrend Factorfloat2.0stFactor
BB Lengthint20bbLen
BB StdDevfloat2.0bbMult
Allow Midline SweepbooltrueuseBBMid
Allow Outer Band SweepbooltrueuseBBOuter
Fractal Strength (left/right bars)int2frLen
Require Fractal Pivot SweepbooltrueuseFrSweep
Use MACD Momentum FilterbooltrueuseMACD
MACD Fastint12macdFast
MACD Slowint26macdSlow
MACD Signalint9macdSignal
Show all 27 settings
SettingTypeDefaultVariable
MACD Opposing Threshold (avoid long if hist < -this, short if hist > +this)float0.0macdOpposingThreshold
Allow Sweep on Prior Bar (rejection on current bar)booltrueallowSweepPriorBar
Rejection Candle Min Body % of Range (0 = any)float0.0rejectionMinBodyPct
Stop Loss %float0.35slPct
Setup Expires After N Barsint2setupExpires
Enable ShortsbooltrueuseShorts
Exit on BB Band Touch (upper=longs, lower=shorts)booltrueuseBBTouchExit
When BB Expanding: Hold Until Band Curve TurnsbooltrueuseCurveTurnHold
Exit on Long Wick (rejection = level unlikely to break)booltrueuseLongWickExit
Long Wick Min % of Bar Rangefloat50.0longWickPct
Max Hold Bars (safety cap)int20maxHoldBars
Exit on Trend Flip (Supertrend)boolfalseuseTrendFlipExit
Show Entry & Exit ArrowsbooltrueshowArrows
Show Last Fractal LevelsbooltrueshowFractals
Show Bollinger BandsbooltrueshowBB
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Box Scalper v4

by wynnforthework
2 stars

Box Scalper v4 is a strategy that plots buy and sell signals on the price chart using ADX trend filters, QQE momentum oscillator, and BOX channels. It signals entries based on crossovers and zone conditions, with trailing stop loss and take profit targets. Par

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Box Scalper v4

This strategy trades S50 TFEX USDTHB contracts on the price chart. It detects swing highs and swing lows with pivot points to generate long entries on swing highs and short entries on swing lows. The ATR indicator calculates dynamic stop-loss distances while t

Strategy v6 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy With ATR and Stoploss
257 stars

This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry

Strategy v6 Volatility & bandsSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of V1.6 ES - Futures 1M No Repaint

Nasdaq Prop Firm Strategy

by TradersPost
218 stars

This strategy uses multiple VWAP anchors and a custom Lull indicator to generate buy and sell signals on the Nasdaq price chart. It plots the VWAP trend line and three VWAP anchors with customizable colors and mitigation methods. The Lull indicator produces si

Strategy v6 TrendSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Nasdaq Prop Firm Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers