What it does
Liquidity Sweep Marker is meant for traders who care about stop runs, failed breaks, and fast rejections around obvious chart levels. It helps keep sweep behavior visible without forcing the whole workflow into a replay-only or discretionary annotation routine.
Who this is for
This page is aimed at traders who already know what problem Liquidity Sweep Marker is solving and want clearer notes on setup, tradeoffs, and platform coverage.
Key terms for this tool
Review the core trading and platform terms tied to this page before changing settings or using the study in a live workspace.
What it is not
Liquidity Sweep Marker is a chart-context tool. It does not place trades, manage risk automatically, or promise that a specific pattern will resolve in one direction. Use it to organize decisions, not to outsource them.
Chart examples
This chart capture shows the study on a real NinjaTrader workspace. Use it as visual reference, then confirm behavior on your own instrument, session, and timeframe.
Sweep arrows on chart
A chart showing Liquidity Sweep Marker using directional arrows to call out high and low sweep events.
Best fit
- Spotting failed breaks above highs or below lows.
- Separating stop-clearing moves from cleaner continuation attempts.
- Adding structure-based context around false-breakout setups.
Before using it live
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow, or compile the source block for another platform on a clean chart first.
- Set the sweep lookback to match the kind of swing or session structure you trade.
- Treat the marker as a context event and confirm it with rejection or follow-through.
- Review how the tool behaves on your actual session template, chart type, and instrument.
Settings to review
Controls how far back the script looks when deciding whether a recent high or low was swept.
Moves the sweep marker farther above or below price so the arrows stay readable.
Controls the colors of the bullish and bearish sweep markers.
Installation notes
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow, or compile the source block for another platform on a clean chart first.
- Set the sweep lookback to match the kind of swing or session structure you trade.
- Treat the marker as a context event and confirm it with rejection or follow-through.
Downloads
After the download
Keep the next step tied to this exact tool
Install it cleanly, subscribe for future updates if this workflow matters, or move straight into a structured request if the tool needs another platform or a custom version.
Install guide
Keep the workspace stable
Use the clean import flow before a promising download turns into a platform cleanup project.
Open install guideEmail follow-up
Get updates if this tool changes
Use the email signup if you want future indicator and workflow updates without checking back manually.
Join updatesPaid priority
Escalate when the free file is not enough
Best fit for ports, urgent fixes, or workflow-specific custom work that should not wait in the normal queue.
Open request formSource code
These source examples are provided for copy/paste workflows on other charting platforms. Review and test any script in a simulator before using it on a live chart.
{
Liquidity Sweep Marker
FreeIndicators.com source example.
Works as a starting point for TradeStation EasyLanguage and MultiCharts PowerLanguage.
}
Inputs: Lookback(10), MarkerOffsetTicks(2);
Vars: PriorHigh(0), PriorLow(0), SweepHigh(False), SweepLow(False), OffsetValue(0);
PriorHigh = Highest(High[1], Lookback);
PriorLow = Lowest(Low[1], Lookback);
SweepHigh = High > PriorHigh And Close < PriorHigh;
SweepLow = Low < PriorLow And Close > PriorLow;
OffsetValue = MarkerOffsetTicks * (MinMove / PriceScale);
If SweepHigh Then Plot1(High + OffsetValue, "SweepHigh");
If SweepLow Then Plot2(Low - OffsetValue, "SweepLow"); // Liquidity Sweep Marker
// FreeIndicators.com source example for MetaTrader 4.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_color3 SeaGreen
double Buffer1[];
double Buffer2[];
double Buffer3[];
int init() {
SetIndexBuffer(0, Buffer1);
SetIndexBuffer(1, Buffer2);
SetIndexBuffer(2, Buffer3);
return(0);
}
int start() {
int counted = IndicatorCounted();
int limit = Bars - counted - 1;
int lookback = 10;
double markerOffset = 2.0 * Point;
for(int i = limit; i >= lookback; i--) {
double priorHigh = High[iHighest(NULL, 0, MODE_HIGH, lookback, i + 1)];
double priorLow = Low[iLowest(NULL, 0, MODE_LOW, lookback, i + 1)];
bool sweepHigh = High[i] > priorHigh && Close[i] < priorHigh;
bool sweepLow = Low[i] < priorLow && Close[i] > priorLow;
Buffer1[i] = sweepHigh ? High[i] + markerOffset : EMPTY_VALUE;
Buffer2[i] = sweepLow ? Low[i] - markerOffset : EMPTY_VALUE;
}
return(0);
} // Liquidity Sweep Marker
// FreeIndicators.com source example for MetaTrader 5.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 3
double Buffer1[];
double Buffer2[];
double Buffer3[];
int OnInit() {
SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
return(INIT_SUCCEEDED);
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[]) {
int start = prev_calculated > 1 ? prev_calculated - 1 : 1;
int lookback = 10;
double markerOffset = 2.0 * _Point;
for(int i = start + lookback; i < rates_total; i++) {
double priorHigh = high[i - 1];
double priorLow = low[i - 1];
for(int j = 2; j <= lookback; j++) {
priorHigh = MathMax(priorHigh, high[i - j]);
priorLow = MathMin(priorLow, low[i - j]);
}
bool sweepHigh = high[i] > priorHigh && close[i] < priorHigh;
bool sweepLow = low[i] < priorLow && close[i] > priorLow;
Buffer1[i] = sweepHigh ? high[i] + markerOffset : EMPTY_VALUE;
Buffer2[i] = sweepLow ? low[i] - markerOffset : EMPTY_VALUE;
}
return(rates_total);
} //@version=5
indicator("Liquidity Sweep Marker", overlay=true)
lookback = input.int(10, "Sweep lookback", minval=2)
markerOffsetTicks = input.int(2, "Marker offset ticks", minval=0)
priorHigh = ta.highest(high[1], lookback)
priorLow = ta.lowest(low[1], lookback)
sweepHigh = high > priorHigh and close < priorHigh
sweepLow = low < priorLow and close > priorLow
plotshape(sweepHigh, "High sweep", shape.triangledown, location.abovebar, color=color.red, text="LS", offset=0)
plotshape(sweepLow, "Low sweep", shape.triangleup, location.belowbar, color=color.green, text="LS", offset=0) Limitations
- Sweep definitions vary and should be tested carefully.
- Not every sweep leads to a reversal or meaningful reclaim.
- Very short lookbacks can create noisy labels on fast charts.
Frequently asked questions
Does it repaint?
This tool can revise its most recent labels or levels until enough bars have formed to confirm the swing or range it is using. Older confirmed values should be more stable than the most recent developing ones.
Which platforms are covered?
NinjaTrader 8, TradeStation EasyLanguage, MultiCharts PowerLanguage, MetaTrader 4, MetaTrader 5, TradingView Pine Script are currently represented through downloads or source pages.
Is source code included?
Yes. This page includes source examples or links to platform-specific source pages where applicable.