INVITE-ONLY SCRIPT

Candlestick Pattern Strategy with Risk Management + Alerts

24
This strategy is built to detect volatility-driven squeeze expansion moves and automatically backtest both Breakout Longs and Breakdown Shorts with adjustable take-profit, stop-loss and volume confirmation filters.

It includes a built-in Auto-Optimizer, allowing the script to test multiple TP/SL/RSI/Volume profiles and automatically select the best configuration for the current market environment. Works across Stocks, Crypto and Forex — with each market automatically adjusting core system parameters.
🚀 Strategy Features
Feature Description
🔥 Long + Short Squeeze Detection Entries triggered by volatility expansion + BB break + strong momentum
⚙️ Auto-Optimizer Searches multiple TP/SL/RSI/Volume settings & selects best performer
📈 Full Backtest-Ready Strategy Includes stops, take profits + built-in performance table
🔔 Real-Time Alerts Get alerted instantly when a long or short squeeze event forms
🔄 Multi-Market Mode Tailored volatility & smoothing settings for Stocks / Crypto / Forex
🧠 Vol Spike Validation Filters signals using relative volume impulse
🏁 Trade Exit Logic Dynamic SL/TP calculated automatically based on optimized parameters
📊 How It Works

Detects breakouts above upper Bollinger band or breakdowns below lower band

Confirms strength using ATR expansion + Volume Surge

Confirms momentum using RSI selection (9/14/20 based on profile)

Enters Long/Short squeeze trade depending on breakout direction

Risk management automatically deploys TP + SL, optimized or manual

Displays performance statistics after backtest execution

🧬 Auto-Optimizer Logic

If Optimizer Mode = ON, the script tests:

Variable Range Tested
TP % 8 → 15%
SL % 4 → 8%
Volume Spike Filter 1.5 → 3.0x
RSI Window 9 / 14 / 20

The configuration that produces the highest score becomes active automatically for signals + backtest.

🛎 Alerts Included

🔥 Long Squeeze Alert

💀 Short Squeeze Alert

You can create TradingView alerts using → Add Alert → ANY alert() function call

Recommended Use

✔ Backtest system performance across assets
✔ Use Optimizer mode to find ideal TP/SL profiles
✔ Enable alerts for real-time squeeze entries
✔ Works best on 1h / 4h / 1D timeframes
🚫 Not financial advice — for research + strategy development only

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.