OPEN-SOURCE SCRIPT

Buying Opportunity Score V2.2

92
Buying Opportunity Indicator V2.2

What This Indicator Does

This indicator identifies potential buying opportunities during market fear and pullbacks by combining multiple technical signals into a single composite score (0-100). Higher scores indicate more fear/oversold conditions are present simultaneously.

Why These Components?

Market bottoms typically occur when multiple fear signals align. This indicator combines five complementary measurements that each capture different aspects of market stress:

1. VIX Level (30 points) - Measures implied volatility/fear. VIX spikes during selloffs as traders buy protection. Thresholds based on historical percentiles (VIX 25+ is ~85th percentile historically).

2. Price Drawdown (30 points) - Distance from 52-week high. Larger drawdowns create better risk/reward for mean reversion entries. A 10%+ drawdown from highs historically presents better entry points than buying at all-time highs.

3. RSI 14 (12 points) - Classic momentum oscillator measuring oversold conditions. RSI below 30 indicates short-term selling exhaustion.

4. Bollinger Band Position (13 points) - Statistical measure of price extension. Price below the lower band (2 standard deviations) indicates statistically unusual weakness.

5. VIX Timing (15 points) - Bonus points when VIX is declining from a recent peak. This helps avoid catching falling knives by waiting for fear to subside.

How The Score Works

- Each component contributes points based on severity
- Components are weighted by predictive value from historical analysis
- Score of 70+ means multiple fear signals are present
- Score of 80+ means extreme fear across most components

How To Use

1. Apply to SPY, QQQ, or IWM on daily timeframe
2. Monitor the Current Score in the statistics table
3. Scores below 50 = normal conditions, no action needed
4. Scores 60-69 = elevated fear, monitor closely
5. Scores 70+ = consider entering long positions
6. Scores 80+ = strongest historical entry points

Important Limitations

- This is a research tool, not financial advice
- Past patterns may not repeat in the future
- Signals are infrequent (typically 2-4 per year reaching 70+)
- Works best on broad market ETFs; not validated for individual stocks
- Always use proper position sizing and risk management
- The indicator identifies conditions that have historically been favorable, but cannot predict future returns

Statistics Table

The table shows:
- Current Score with context message
- Chart Results: Rolling 1Y/3Y/5Y statistics from your loaded chart data

Alerts

Multiple alert options available for different score thresholds.

Open Source

Code is fully visible for review and educational purposes.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.