OPEN-SOURCE SCRIPT
TastyStocks S/R Levels

TastyStocks S/R Levels v2 automatically plots the key support and resistance levels used in professional options trading analysis — previous period highs/lows, confirmed swing pivots, and gap fill targets — all extending to the right edge of the chart with price labels for quick reference.
What it draws:
Previous Day / Week / Month Highs & Lows — classic institutional reference levels that act as magnet prices and are widely watched for reversals and breakouts
Swing Pivot Highs & Lows — confirmed multi-bar pivot points anchored at the exact bar where the pivot formed, automatically deduplicated so nearby levels don't clutter the chart
Gap Fill Levels — detects opening gaps above or below the prior close and marks the fill target with a dashed line; lines automatically disappear once price fills through them
Key features:
All lines extend to the right so levels remain visible as new bars form
Price labels float at the right edge for instant level identification
ATR-based merge tolerance prevents duplicate levels from printing too close together
Gap fill lines self-delete once the gap is filled — no manual cleanup needed
Fully customizable colors, line widths, pivot lookback periods, minimum gap size, and max level counts
Resistance levels in red, support levels in green, gap fills color-coded by direction
Best used on: Daily and session charts for swing and options trade planning. Works on any ticker.
What it draws:
Previous Day / Week / Month Highs & Lows — classic institutional reference levels that act as magnet prices and are widely watched for reversals and breakouts
Swing Pivot Highs & Lows — confirmed multi-bar pivot points anchored at the exact bar where the pivot formed, automatically deduplicated so nearby levels don't clutter the chart
Gap Fill Levels — detects opening gaps above or below the prior close and marks the fill target with a dashed line; lines automatically disappear once price fills through them
Key features:
All lines extend to the right so levels remain visible as new bars form
Price labels float at the right edge for instant level identification
ATR-based merge tolerance prevents duplicate levels from printing too close together
Gap fill lines self-delete once the gap is filled — no manual cleanup needed
Fully customizable colors, line widths, pivot lookback periods, minimum gap size, and max level counts
Resistance levels in red, support levels in green, gap fills color-coded by direction
Best used on: Daily and session charts for swing and options trade planning. Works on any ticker.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.