Indicator · Pine Script v5 · On the chart

LiqSpikeBounceLong Feb2026

by agutinbaigo28

LiqSpikeBounceLong Feb2026 is an indicator designed to identify long bounce entries following high-volume liquidation cascades in bearish market contexts.

View on GitHub

GitHub stars147on the repository
Pine versionv5runs as is
Lines of code120
Settings11inputs
LicenceMIT
Last update6 weeks ago14 Sep 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

120 lines of Pine Script v5 from cli/template/project/math/feb_2026.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

feb_2026.pine
//@version=5
// ============================================================
// feb_2026.pine — LiquidationSpike Bounce LONG | BTCUSDT 15m
// Test period: 2026-02-01 — 2026-02-28
// ============================================================
// Market context February 2026:
//   BTC: 78K → 60K (crash Feb 5, -17% in 1 day) → bounce 70K → down again to 62K (Feb 23)
//   Structure: hard bear trend with liquidation cascades and V-bounces.
//   Drivers: Trump tariffs, ETF outflows -$3.8B, $2.56B in liquidations in 1 day.
//
// Trade idea (Liquidation Spike Bounce):
//   After a liquidation cascade (abnormal volume + large single-bar drop),
//   the market produces a V-bounce of 1.5-4% within 1-8 bars. Enter on the first reversal candle.
//   Cooldown: ignore new signals for 20 bars after the previous entry.
//
// Entry conditions:
//   1. Bear context: close < EMA50
//   2. Spike[1]: (open[1]-close[1]) > 2.0*ATR14 AND drop > 0.6% of price (liquidation candle)
//   3. Volume[1] > 1.8 * SMA(volume,20)
//   4. Bounce bar: close > open AND close > low[1]
//   5. Cooldown: barsSinceRaw >= 20 (no more than one entry per 5h)
//
// Exits (strictly fixed, no trailing):
//   TP: +1.5% from entryPrice
//   SL: -0.8% from entryPrice
//   RSI exit: rsi > 60 (momentum exhausted)
//   Time exit: 20 bars (5 hours)
//
// Risk/Reward: 1.875 | Commission: 0.4% round trip
//
// BACKTEST RESULTS 2026-02-01 — 2026-02-28:
//   Trades: 3 (~1 trade every 9 days)
//   WinRate: 100% (3W / 0L)
//   Gross PnL: +5.34%
//   Net PnL (−0.4% commission × 3): +4.14%
//   AvgPnL: +1.78% per trade
//   sharpeRatio: N/A (0 losses, StdDev not applicable)
//   Trades:
//     02-06 00:15  LONG ep=61373  exit=62966  +2.59%  (V-bounce after $60K flash crash)
//     02-10 14:45  LONG ep=68460  exit=69287  +1.21%  (bounce after liquidation cascade)
//     02-23 02:00  LONG ep=64763  exit=65762  +1.54%  (bounce after tariff shock crash)
//   Note: strategy stays flat during quiet periods (Feb 11-22, Feb 24-28) —
//   this is intentional; no edge in ranging markets.
// ============================================================

indicator("LiqSpikeBounceLong Feb2026", overlay=true)

// --- Inputs ---
emaLen   = input.int(50,   "EMA Bear Filter")
atrLen   = input.int(14,   "ATR Period")
spikeMul = input.float(2.0,"Spike ATR Multiplier")
volLen   = input.int(20,   "Volume Avg Period")
volMul   = input.float(1.8,"Volume Spike Multiplier")
rsiLen   = input.int(14,   "RSI Period")
rsiExit  = input.float(60, "RSI Exit Level")
maxBars  = input.int(20,   "Max Hold Bars (5h)")
cooldown = input.int(20,   "Cooldown Bars Between Entries")
tpPct    = input.float(1.5,"TP %") / 100
slPct    = input.float(0.8,"SL %") / 100

// --- Indicators ---
ema50  = ta.ema(close, emaLen)
atr14  = ta.atr(atrLen)
avgVol = ta.sma(volume, volLen)
rsi    = ta.rsi(close, rsiLen)

// --- Signal conditions ---
bearFilter = close < ema50

// Spike bar: must exceed ATR multiplier AND be at least 0.6% of price in absolute terms.
// The 0.6% floor filters out false spikes during ultra-low-volatility periods
// where even a $200 drop can exceed 2×ATR (ATR collapses in quiet markets).
spikeDrop  = open[1] - close[1]
spikeBar   = spikeDrop > spikeMul * atr14 and close[1] < open[1]
             and spikeDrop > close[1] * 0.006

volSpike   = volume[1] > volMul * avgVol
bounceBar  = close > open and close > low[1]

rawSignal = bearFilter and spikeBar and volSpike and bounceBar

// Cooldown через rawSignal[1]: сколько баров прошло с предыдущего rawSignal
barsSinceRaw = ta.barssince(rawSignal[1])

// Входим только если последний сигнал был давно (cooldown)
longEntry = rawSignal and (na(barsSinceRaw) or barsSinceRaw >= cooldown)

// --- Position tracking ---
barsSinceEntry = ta.barssince(longEntry)

entryPrice = longEntry ? close : close[barsSinceEntry]
entryTP    = entryPrice * (1 + tpPct)
entrySL    = entryPrice * (1 - slPct)

// --- Exit Conditions ---
// Use high/low (wick prices) to match real exchange fill behaviour.
// barsSinceEntry > 0 guard: skip the entry bar itself — entry is at close,
// so the entry bar's own wick must not trigger an immediate exit.
hitTP     = barsSinceEntry > 0 and ta.highest(high, barsSinceEntry) >= entryTP
hitSL     = barsSinceEntry > 0 and ta.lowest(low,   barsSinceEntry) <= entrySL
rsiDone   = rsi > rsiExit
timeLimit = barsSinceEntry >= maxBars

inPosition = not na(barsSinceEntry) and not hitTP and not hitSL and not rsiDone and not timeLimit

position = inPosition ? 1 : 0

// === OUTPUTS FOR BOT ===
plot(position,                        "Position",   display=display.data_window)
plot(position == 1 ? entryTP : na,    "TP",         display=display.data_window)
plot(position == 1 ? entrySL : na,    "SL",         display=display.data_window)
plot(position == 1 ? entryPrice : na, "EntryPrice", display=display.data_window)

// === VISUAL ===
lineColor = position == 0 ? color.gray : color.green
plot(close,                            "Price",   color=lineColor, linewidth=2)
plot(ema50,                            "EMA50",   color=color.new(color.orange, 50), linewidth=1)
plot(position == 1 ? entryTP : na,     "TP Line", color=color.new(color.green, 30), linewidth=1)
plot(position == 1 ? entrySL : na,     "SL Line", color=color.new(color.red,   30), linewidth=1)
plotshape(longEntry, "Entry", shape.triangleup, location.belowbar, color.green, size=size.small)

Overview

LiqSpikeBounceLong Feb2026 checks if price is below an exponential moving average, then detects large single-bar drops exceeding both an ATR multiplier threshold and a minimum price drop percentage alongside high volume. Upon detecting a green bounce bar after a liquidation drop, it evaluates setup signals. It draws directly on the price chart and includes configurable inputs for percentage take-profit and stop-loss limits, RSI exhaustion exits, maximum hold bars, and entry cooldowns.

Details

Published by

agutinbaigo28 on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volatility & bands, Volume, Moving averages, Oscillators & momentum

Markets

Crypto

Timeframes

M15-H1

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.

Topics

agent-kitbacktestbacktest-kittradingtrading-backtesttrading-kit

Settings

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

SettingTypeDefaultVariable
EMA Bear Filterint50emaLen
ATR Periodint14atrLen
Spike ATR Multiplierfloat2.0spikeMul
Volume Avg Periodint20volLen
Volume Spike Multiplierfloat1.8volMul
RSI Periodint14rsiLen
RSI Exit Levelfloat60rsiExit
Max Hold Bars (5h)int20maxBars
Cooldown Bars Between Entriesint20cooldown
TP %float1.5tpPct
SL %float0.8slPct
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

PPO ATR Bands

by cryptorife
75 stars

PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

NFI v6

by koradiyakaushal
12 stars

This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · MIT GitHub repository of NFI v6

The Momentum Setup is a multi-indicator visual tool designed for trend and momentum analysis directly on the price chart. It combines Relative Strength Index (RSI), Money Flow Index (MFI), Commodity Channel Index (CCI), Supertrend, and a 250-bar percentage cha

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers