Trading Tools, Scripting & API

Building a Pine Script Crypto Liquidation Indicator in TradingView

Pine Script v5 Architecture for Liquidation Cascade Alerts

TradingView allows traders to plot custom levels and trigger automated webhook alerts when price crosses specific quantitative boundaries. Below is a sample architecture for plotting dynamic liquidation bounds:
PINESCRIPT
//@version=5
indicator("Kingfisher Liquidation Bounds", overlay=true)

// Inputs for Liquidation Thresholds
var upperLiqLevel = input.float(102500.0, "Short Liquidation Pool ($)")
var lowerLiqLevel = input.float(96200.0, "Long Liquidation Pool ($)")

// Plot Horizontal Cluster Lines
plot(upperLiqLevel, "Short Liq Pool", color=color.new(color.red, 20), linewidth=2, style=plot.style_linebr)
plot(lowerLiqLevel, "Long Liq Pool", color=color.new(color.green, 20), linewidth=2, style=plot.style_linebr)

// Alert Trigger Conditions
shortSqueezeTrigger = ta.crossover(close, upperLiqLevel)
longCascadeTrigger  = ta.crossunder(close, lowerLiqLevel)

alertcondition(shortSqueezeTrigger, "Short Squeeze Active", "Price crossed into major short liquidation pool!")
alertcondition(longCascadeTrigger, "Long Cascade Active", "Price crossed into major long liquidation pool!")
Comprehensive Cluster Guide

Advanced Crypto Trading Tools: Pine Scripting, APIs & Quant Workspaces

Complete guide to professional crypto trading tools. Learn how to build custom Pine Script indicators, stream WebSocket liquidation feeds, and automate squeeze bots.

Read Master Guide
Institutional Tooling

Access Liquidation Map API

Get API keys to power custom TradingView alerts and programmatic webhooks.

Access Liquidation Map API

Frequently Asked Questions

Can I connect TradingView webhooks directly to Kingfisher API signals?

Yes. Subscribers can configure TradingView alert webhooks to trigger automated trading bots on exchanges whenever liquidation levels are swept.