OPEN-SOURCE SCRIPT
SFP All Swings

This is a simplified and raw price action focused version of the SFP (Swing Failure Pattern) algorithm originally published by LuxAlgo.
📝 Inspiration & Attribution
This script is built upon the professional SFP detection logic developed by LuxAlgo. In this specific version, we have streamlined the code to focus entirely on core technical SFP requirements and confirmation mechanics. Credit goes to the LuxAlgo team for their original framework.
🛠 Technical Highlights
Raw Price Action Focus: It monitors major swing high and low violations (liquidity grabs) without any external noise, focusing strictly on price behavior.
Wick & Close Logic: Automatically identifies scenarios where the price wicks beyond a prior level but fails to sustain the breakout, closing back inside the range.
Confirmation Engine: Tracks an internal "Confirmation Line." A valid setup is only confirmed once the price closes beyond this specific structural level (marked with ▲/▼).
Auto-Cleanup: To maintain a clean trading environment, the script automatically removes lines and labels for invalidated or expired setups.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.