OPEN-SOURCE SCRIPT
Cave Diving 3 Lines System

🤿 Cave Diving Dashboard - A Deep Dive into Market Structure
## The Cave Diving Analogy
Imagine you're a cave diver exploring underwater caverns. As you descend deeper, you encounter different layers of the cave system:
- **The Surface (Internal Levels)** - Where you currently are, constantly shifting with each breath
- **The First Chamber (De Novo Levels)** - Your last known safe position, recently established
- **Deep Caverns (External Levels)** - Ancient, untouched chambers deeper in the system
Just as a cave diver must constantly monitor their position relative to these reference points, traders must track price action against key structural levels.
---
## 🎯 Understanding the Three-Tiered System
### 📍 **INTERNAL LEVELS** (Current 15m Candle)
*Your real-time position in the market*
**Internal High** 🟡 - The highest point reached in the current unfinished 15-minute candle
**Internal Low** 🟢 - The lowest point reached in the current unfinished 15-minute candle
**Think of these as:**
- Your current depth while actively diving
- They update continuously as price moves
- Status shows "Updating" when actively changing, "Intact" when stable
- These are NOT trade levels—they're awareness zones
**Key Insight:** When Internal Low drops below De Novo Low, you're in **Situation A** (bearish pressure building)—the indicator highlights this with red coloring.
---
### 🎯 **DE NOVO LEVELS** (Previous Closed 15m Candle)
*Your most recent confirmed safe zone*
**De Novo High** 🔵 - The high of the last completed 15-minute candle
**De Novo Low** 🟣 - The low of the last completed 15-minute candle
**Etymology:** "De Novo" = Latin for "from new" or "anew"—these are freshly established reference points
**Think of these as:**
- The last solid ground you stood on
- Your most recent confirmed position
- The bridge between where you are (Internal) and where you've been (External)
**Status Tracking:**
- **⬆️ Upgrade** - Level moved favorably (Higher high for resistance, Higher low for support)
- **⬇️ Downgrade** - Level moved unfavorably (Lower high, Lower low)
- **= Same** - No structural change from previous candle
**Trading Significance:**
- Primary reference points for intraday structure
- Breaking De Novo levels often signals directional commitment
- Can merge with External Level 1 when they align (shown as "DN🟰Ext1")
---
### ⛽🤿 **EXTERNAL LEVELS** (Unmitigated Historical 15m Levels)
*Deep liquidity pools waiting to be discovered*
**External High 1 & 2** 🟢🔵 - The two most recent unmitigated 15m highs
**External Low 1 & 2** 🟠🌸 - The two most recent unmitigated 15m lows
**Think of these as:**
- Untouched chambers in the cave system
- Liquidity pools that smart money is targeting
- Levels that "remember" and attract price
**What Makes a Level "Unmitigated"?**
- **Highs**: Price has NOT yet traded through them (broken above)
- **Lows**: Price has NOT yet swept them (broken below)
- Once touched, they're "mitigated" and removed from tracking
- The indicator automatically maintains the two most recent unmitigated levels
**Why "External"?**
They exist outside your current candle structure—historical reference points that institutions use for:
- Stop loss placement
- Profit taking targets
- Liquidity hunting zones
---
## 🎨 Color Coding System
### HIGHS (Resistance/Targets) - Cool Colors
- 🔵 **Ext High 2** - Light Blue (Distant target)
- 🟢 **Ext High 1** - Lime Green (Primary target)
- 🔵 **De Novo High** - Cyan (Recent resistance)
- 🟡 **Internal High** - Lemon Yellow (Current ceiling)
### LOWS (Support/Stops) - Warm Colors
- 🟢 **Internal Low** - Lime (Current floor)
- 🟣 **De Novo Low** - Purple (Recent support)
- 🟠 **Ext Low 1** - Orange-Red (Primary stop zone)
- 🌸 **Ext Low 2** - Pink (Distant support)
---
## 📊 Dashboard Breakdown
### The Table Shows:
1. **Level** - Which level you're tracking
2. **Price** - Exact price of the level
3. **Pts** - Distance from current price (+ above, - below)
4. **Status** - Current state or role of the level
### Special Features:
- **⏰ Countdown Timer** - Shows time remaining until next 15m candle close (next De Novo update)
- **⚠️ Proximity Alerts** - Bottom row warns when within threshold distance of key levels (default: 25 points, adjustable)
---
## 🎯 Trading Applications
### **For Buyers (Going Long):**
- **Entry Zone**: Between De Novo Low and Ext Low 1
- **Stops**: Below Ext Low 1 (or Ext Low 2 for wider stops)
- **Targets**: De Novo High → Ext High 1 → Ext High 2
- **Confirmation**: Internal Low holds above De Novo Low
### **For Sellers (Going Short):**
- **Entry Zone**: Between De Novo High and Ext High 1
- **Stops**: Above Ext High 1 (or Ext High 2 for wider stops)
- **Targets**: De Novo Low → Ext Low 1 → Ext Low 2
- **Warning**: Watch for Situation A (Internal Low < De Novo Low)
### **Risk Management:**
- **DN🟰Ext1** status means De Novo = External 1 (tighter range, use caution)
- Proximity alerts help you avoid chasing price into resistance/support
- "Updating" status on Internal levels = active volatility
- "Upgrade/Downgrade" signals = structural shift in progress
---
## ⚙️ Customization Options
### Lookback Period
- Default: 500 candles (searches 125 hours of 15m data)
- Increase for more historical External levels
- Decrease for focus on recent structure
### Proximity Threshold
- Default: 25 points
- Set based on your instrument's average range
- Lower = tighter alerts (for scalping)
- Higher = strategic warnings (for swing trading)
### Visual Customization
- Line thickness (1-5)
- Line style (Solid/Dashed/Dotted)
- All colors fully customizable
- Show/hide lines independently
---
## 🧭 The Cave Diving Mindset
**Never dive deeper than you can safely return from.**
In trading terms:
- Know your Internal position (real-time awareness)
- Respect your De Novo levels (recent structure)
- Hunt for External liquidity (where the targets are)
- Always have an exit plan (stops below Ext Lows, above Ext Highs)
The market, like a cave, has structure. This indicator illuminates that structure across three timeframes of reference, helping you navigate with precision rather than guessing in the dark.
---
## 🎓 Key Takeaways
1. **Internal** = Real-time, unfinished, awareness only
2. **De Novo** = Just confirmed, primary reference, updates every 15m
3. **External** = Historical, unmitigated, high-probability targets/stops
4. **Upgrades/Downgrades** = Trend signals
5. **DN🟰Ext1** = Structural alignment (tighter range)
6. **Situation A** = Bearish warning (Internal < De Novo Low)
---
## 📝 Credits
*"In cave diving, you plan your dive and dive your plan. In trading, you plan your levels and trade your levels."*
**Indicator:** Cave Diving Dashboard - Part 1: Price Levels
**Timeframe:** Optimized for 15-minute structure on any chart timeframe
**Philosophy:** Structure first, price second. Know where you are, where you've been, and where the liquidity waits.
---
Happy Diving! 🤿📈
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.