OPEN-SOURCE SCRIPT

Smart Whale

73
Overview The Smart Whale Breakout System is a pure momentum strategy designed for Swing Traders who want to capture high-probability breakouts while managing risk with a mechanical trailing stop.

Unlike indicators that try to guess "bottoms," this system follows the "Smart Money" approach: buying strength when institutional volume enters, and riding the trend until the momentum breaks.

How it Works

1. The Entry (The Hunter) The system identifies a valid BREAKOUT signal only when four specific conditions align:

Trend Filter: Price must be above the 150 SMA. We only trade with the long-term trend.

Momentum: RSI > 50. Ensuring bulls are in control.

Volume Spike (Whale Activity): Current volume must be significantly higher than the average (Default: 1.5x). This filters out weak retail moves.

Price Action: A bullish candle closing higher than it opened.

2. The Exit (The Manager) Once in a trade, the system activates a dynamic Trailing Stop line. You never have to guess when to sell. You can choose between two exit logic modes in the settings:

ATR Trailing (Default): Adapts to volatility. The stop moves up based on a multiple of the Average True Range (ATR). Great for volatile stocks (e.g., TSLA, NVDA).

Percent Trailing: A fixed percentage drop from the highest high. (e.g., "Sell if price drops 10% from peak").

3. The Context (Optional Filter)

Squeeze Filter: Includes a built-in Bollinger/Keltner squeeze detection. If enabled in settings, the system will only signal a buy if the price recently broke out of a consolidation (squeeze). Default is OFF to catch all momentum moves.

Key Features

NO Repainting: Signals are confirmed at candle close.

Visual Risk Management: A Red Trailing Stop line clearly shows where your invalidation point is.

Fully Customizable: Adjust the Volume multiplier, ATR sensitivity, or Percentage drop to fit your asset class (Crypto/Stocks/Forex).

Clean Visuals: Only colors the Breakout and Sell candles to keep your chart clean.

Settings Guide

Trend SMA Length: Define the long-term trend baseline (Default: 150).

Volume Spike (xAvg): How much volume is needed to trigger a buy? (1.5 = 150% of average).

Exit Method: Choose between "ATR Trailing" or "Percent Trailing".

ATR Multiplier: Tighter stop (2.0) vs Looser stop (3.0).

Require Squeeze?: Check this to filter for breakouts that only happen after a consolidation period.

Disclaimer This tool is for educational purposes only. Always use proper risk management.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.