PROTECTED SOURCE SCRIPT

HTF Scanner Pro | High Tight Flag | Leif Soreide

29
📊 HTF Scanner Pro| High Tight Flag Pattern Detector
🎯 Overview

HTF Scanner Pro is a professional-grade pattern recognition indicator designed to identify one of the most powerful and rare chart patterns in technical analysis: the High Tight Flag (HTF). Based on the rigorous research of William O'Neil (founder of Investor's Business Daily and creator of CANSLIM) and refined by Leif Soreide's extensive pattern studies, this indicator provides institutional-level pattern detection with a premium visual experience.

The High Tight Flag pattern historically delivers 69-85% success rates when properly identified, making it one of the most reliable bullish continuation patterns. However, it's extremely rare—you might only see 2-5 valid setups per year across thousands of stocks. This indicator does the heavy lifting of scanning and scoring potential setups so you never miss an opportunity.

----------------------------------------------------------------------------------------------
⚡ Key Features

🔬 6-Component Scoring System (0-10 Scale)
Each potential HTF pattern is analyzed across six critical dimensions:
  • │ Pole │ 25% │ Explosive advance (90-120%+ in 4-8 weeks)
  • │ Flag │ 25% │ Tight consolidation (10-25% pullback, above 50-MA)
  • │ Volume │ 20% │ Heavy pole volume, dry flag volume, breakout surge
  • │ Technical │ 15% │ New highs, relative strength, MA positioning
  • │ Breakout │ 10% │ Proximity to pivot, R:R ratio, target potential
  • │ Catalyst │ 5% │ Fundamental catalyst proxy via price/volume action


📈 Pattern Detection Criteria (O'Neil/Soreide Standards)

THE POLE (Flagpole):
- ✅ Minimum 90% advance (100-120%+ is ideal)
- ✅ Occurs within 4-8 weeks (20-40 trading days)
- ✅ Heavy volume (40-100%+ above average)
- ✅ More up days than down days (clean advance)
- ✅ Usually triggered by fundamental catalyst

THE FLAG (Consolidation):
- ✅ Shallow pullback of only 10-25% from pole high
- ✅ Duration: 1-3 weeks ideal, max 5 weeks
- ✅ MUST stay above 50-day moving average
- ✅ Volume dries up significantly (supply exhaustion)
- ✅ Tight, low-volatility price action

BREAKOUT CONFIRMATION:
- ✅ Price breaks above flag high + $0.10 (classic O'Neil rule)
- ✅ Volume surges 50%+ above average
- ✅ Risk/Reward typically 3:1 or better

----------------------------------------------------------------------------------------------
🎨 Premium Visual Features
Interactive Dashboard
- Real-time pattern scoring with letter grades (A+ to F)
- Component-by-component breakdown with color coding
- Trade setup display (Entry, Target, Stop, R:R)
- Status indicators for flag tightness and pole recency
- Customizable position (6 locations)

Pattern Zone Highlighting
- Pole Zone: Subtle green/blue gradient background
- Flag Zone: Subtle gold/orange gradient background
- Ghost transparency to not obscure price action

Price Level Visualization
- Entry Line (Blue): Flag high + $0.10 breakout level
- Target Line (Green): Projected measured move target
- Stop Line (Red): Below flag low for risk management

Signal Labels
- Large green label for valid HTF signals
- Orange label for partial/forming setups
- Complete trade plan in label (Entry, Target, R:R)

----------------------------------------------------------------------------------------------
📊 How to Use

Signal Interpretation
┌─────────┬───────────────────────────┐
│ Score │ Grade │ Signal │ Action ├─────────┼─────────┼─────────────────┤
│ 8.0+ │ A-/A/A+ │ HIGH TIGHT FLAG │ Valid setup - prepare for entry │
├─────────┼───────────────────────────┤
│ 5.5-7.9 │ C/B │ PARTIAL SETUP │ Monitor - some criteria missing │
├─────────┼─────────┼─────────────────
│ <5.5 │ D/F │ NO SIGNAL │ Not an HTF pattern │
└─────────┴─────────┴────────────────┘

Entry Strategy
- Wait for Setup: Score reaches 8.0+ with all major criteria met
- Entry Point: Buy on breakout above the blue ENTRY line with volume confirmation
- Stop Loss: Place stop just below the red STOP line (flag low)
- Target: Use the green TARGET line as your profit objective
- Position Size: Calculate based on the displayed R:R ratio

Component Checklist
Before entering, verify in the dashboard:
- ✅ Pole shows ✓ with 90%+ gain
- ✅ Flag shows ✓ (above 50-MA)
- ✅ Volume shows ✓ (1.4x+ pole volume)
- ✅ Technical shows ✓ (above 50-MA)
- ✅ Footer shows "◆ TIGHT" and "◆ RECENT"

----------------------------------------------------------------------------------------------
⚙️ Input Settings

Pattern Detection
- Pole Min Period: Minimum pole duration (default: 20 days / 4 weeks)
- Pole Max Period: Maximum pole duration (default: 40 days / 8 weeks)
- Minimum Gain %: Minimum pole advance (default: 90%)
- Good Gain %: Strong pole advance (default: 100%)
- Excellent Gain %: Exceptional pole advance (default: 120%)

Flag Consolidation
- Min Pullback %: Minimum flag pullback (default: 10%)
- Max Pullback %: Maximum flag pullback (default: 25%)
- Min Duration: Minimum flag duration (default: 5 days)
- Max Duration: Maximum flag duration (default: 25 days)

Signal Thresholds
- HTF Signal: Score threshold for valid HTF (default: 8.0)
- Partial Setup: Score threshold for partial setup (default: 5.5)

Visual Settings
- Show Dashboard: Toggle analysis dashboard
- Show Pattern Zones: Toggle pole/flag highlighting
- Show Price Levels: Toggle entry/target/stop lines
- Show Signal Labels: Toggle pattern labels
- Show Moving Averages: Toggle 50 & 200 MA display
- Dashboard Position: Choose from 6 positions

Technical Parameters
- 50-day MA: Period for 50-day moving average
- 200-day MA: Period for 200-day moving average
- RS Period: Lookback for relative strength (default: 126 days / 6 months)

----------------------------------------------------------------------------------------------
🔔 Alerts
Four built-in alert conditions:

- 🚀 HTF BREAKOUT: Price breaks above entry level with volume confirmation
- ⚡ HTF Setup Ready: Valid HTF at pivot, watch for breakout
- ⚡ Early Entry Signal: Volume expanding near pivot (Leif's specialty)
- ◇ Partial Setup: Forming setup worth monitoring
----------------------------------------------------------------------------------------------

📚 Educational Notes
Why HTF Patterns Work

The High Tight Flag represents the ultimate supply/demand imbalance:
- Explosive Pole: Institutions aggressively accumulate, driving price up 100%+
- Tight Flag: Weak hands sell, but no significant supply emerges
- Breakout: Remaining supply absorbed, price explodes to new highs

Historical Performance

According to O'Neil's research and Soreide's studies:
- Success rate: 69-85% when all criteria are met
- Average gain from breakout: 100-200%+
- Failure rate increases significantly if criteria are relaxed

Common Mistakes to Avoid
❌ Buying before breakout confirmation
❌ Ignoring volume requirements
❌ Trading flags that broke below 50-MA
❌ Accepting pullbacks deeper than 25%
❌ Trading old poles (flag must form immediately afterpole)

----------------------------------------------------------------------------------------------

This indicator is a tool to assist with pattern identification and should not be considered financial advice. Always:

- Conduct your own due diligence
- Manage risk appropriately
- Use proper position sizing
- Consider fundamental analysis alongside technical signals

Past performance of the High Tight Flag pattern does not guarantee future results.

📝 Credits & References

- William O'Neil - "How to Make Money in Stocks", CANSLIM methodology
- Leif Soreide - HTF Masterclass, pattern refinement research
- Investor's Business Daily - Pattern recognition standards

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。