OPEN-SOURCE SCRIPT

Dynamic S&R Projector [Polarity Flip]

79
Support and Resistance should not be static. It should tell a story.

Most traders clutter their charts with manually drawn lines, often forgetting which ones were important or which timeframe they came from. This indicator automates the entire process of identifying market structure, adapting dynamically to your trading style while using Volume Price Analysis (VPA) to separate "Smart Money" levels from random noise.

It combines three professional concepts into one tool: Multi-Timeframe Projection, Volume Strength Filtering, and Live Polarity Flipping.

Who is this for?
  • Day Traders: Project Daily levels onto your 1-minute or 5-minute charts. Stop trading in a vacuum; see the walls before you hit them.
  • Swing Traders: Project Weekly levels onto your Daily chart to find major trend reversals.
  • Investors: Project Monthly levels to identify multi-year accumulation zones.


Core Features
1. Smart Timeframe (Auto-Detection) No more toggling settings. The indicator detects what chart you are viewing and automatically projects the next significant Higher Timeframe (HTF) structure:

  • Viewing Intraday (< Daily)? → Projects Daily Pivots.
  • Viewing Daily? → Projects Weekly Pivots.
  • Viewing Weekly? → Projects Monthly Pivots.


2. VPA Strength Filtering (The "Truth" Serum) Not all levels are equal. This script grades every pivot based on the volume activity at the moment it was formed:

  • Thick Solid Line: Formed on High Volume (>1.5x Average). This is an "Institutional Level." Expect hard bounces.
  • Thin Dashed Line: Formed on Low Volume. This is a weak structure.


3. Live Polarity Flip (Support ↔ Resistance) The script monitors price action in real-time to respect the "Principle of Polarity."

  • Wick Protection: The color change is based strictly on the Candle Close. If price wicks through a level but closes back inside, the line retains its original color (rejecting the fakeout).
  • The Flip: Once price successfully closes past a level, the color instantly flips (Red becomes Green, or Green becomes Red) to indicate the new market state.

How to Trade This Indicator (Example Strategies)
Strategy A: The "Concrete Wall" Bounce (Day & Swing) Identify a Thick Green Line below the current price. This represents a Strong HTF Support defended by institutional volume.

  • Action: Set Limit Buy orders at the line or wait for a bullish reversal candle (Hammer) to form at the touch.


Strategy B: The "Paper Wall" Breakout (Momentum) Identify price approaching a Thin Dashed Red Line (Weak Resistance).

  • Action: Since this level lacks volume backing, do not fade it. Look for a breakout setup as price is likely to slice through easily.


Strategy C: The "Flip & Retest" (Trend Following) Watch for a Thick Red Line to turn Green. This means resistance has been conquered.

  • Action: Wait for price to pull back to this new Green line. If it holds (the line stays Green), enter long. You are now using the "roof" as a "floor."


Settings Guide
Calculation Mode:

  • Auto (Higher TF): The recommended "Smart" mode described above.
  • Use Current Chart: Finds pivots on the exact timeframe you are viewing (good for scalping structure).
  • Fixed Manual: Locks the projection to a specific timeframe (e.g., always show Daily).


Pivot Lookback (Sensitivity):


  • Default (10/10): Balances major and minor structure.
  • Higher (20/20): Shows only the most critical major market turns.


Max Number of Lines: Limits how many historical levels are shown to keep your chart clean.

***********************************************************************************************
Disclaimer: This tool is for educational purposes and decision support. Past volume and price action do not guarantee future results. Always manage your risk.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.