Candlestick Pattern Strategy with Risk Management + Alerts

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
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب Marketscannerpros مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.
تعليمات المؤلف
إخلاء المسؤولية
نص برمجي للمستخدمين المدعوين فقط
يمكن فقط للمستخدمين الذين تمت الموافقة عليهم من قبل المؤلف الوصول إلى هذا البرنامج النصي. ستحتاج إلى طلب الإذن والحصول عليه لاستخدامه. يتم منح هذا عادةً بعد الدفع. لمزيد من التفاصيل، اتبع تعليمات المؤلف أدناه أو اتصل ب Marketscannerpros مباشرة.
لا توصي TradingView بالدفع مقابل برنامج نصي أو استخدامه إلا إذا كنت تثق تمامًا في مؤلفه وتفهم كيفية عمله. يمكنك أيضًا العثور على بدائل مجانية ومفتوحة المصدر في نصوص مجتمعنا.