PROTECTED SOURCE SCRIPT

構造型リバーサル

123
This indicator is currently published as a free protected script.
If there’s enough demand, I may release a paid invite-only version later.

# Structural Reversal Indicator

## Automatically Detect Trend Reversals Based on Dow Theory

### 🎯 Overview

The **Structural Reversal** indicator automatically tracks Dow Theory structure (HH/HL/LH/LL) and detects trend reversals when key support/resistance levels break. It visualizes pullbacks and swing highs/lows, providing objective entry and exit signals.

---

## 💡 What is Structural Reversal?

This indicator monitors the market structure according to Dow Theory:
- **HH (Higher High)** - New highs in uptrend
- **HL (Higher Low)** - Pullback in uptrend
- **LH (Lower High)** - Swing high in downtrend
- **LL (Lower Low)** - New lows in downtrend

When these structural levels break, the indicator signals a potential trend reversal.

---

## 📊 Two Key Signals

### 🔵 Low Reversal (Uptrend Failure)
- **Pattern**: HH → HL → HL break
- **Signal**: ▲ LOW marker appears when price breaks below the Higher Low
- **Meaning**: Uptrend has ended, potential bearish reversal

### 🔴 High Reversal (Downtrend Failure)
- **Pattern**: LL → LH → LH break
- **Signal**: ▼ HIGH marker appears when price breaks above the Lower High
- **Meaning**: Downtrend has ended, potential bullish reversal

---

## ✅ Key Features

### 1. True to Dow Theory
- Confirmed bar-based detection (no repaint)
- Dynamic tracking of high/low relationships
- Objective trend structure analysis

### 2. Defense Line Visualization
- **Uptrend**: Blue solid line marks the Higher Low (HL)
- **Downtrend**: Red solid line marks the Lower High (LH)
- Clear visual indication of critical support/resistance levels

### 3. Historical Line Memory
- Keep past defense lines visible
- Track where structure broke
- Multiple line history settings (0-20 lines)

---

## 🔥 Unique Feature: "Untested Line" Visualization

The most innovative aspect of this indicator is the **three-stage line display system**:

| Line Style | Status | Meaning |
|-----------|--------|---------|
| **Solid** | Currently Active | Current defense line to watch |
| **Dashed** | Untested | Price hasn't returned yet = **High probability of reaction** |
| **Dotted** | Tested | Price already reached once = Function completed |

### The Hypothesis

Many traders observe this phenomenon:
- When price returns to a broken level for the **first time**, it often reacts strongly
- However, on the **second visit and beyond**, the level rarely holds

**Dashed lines are key levels to watch!** When price returns to these untested lines, they may provide high-probability reversal opportunities.

---

## ⚙️ Settings

| Parameter | Description | Default | Recommended |
|-----------|-------------|---------|-------------|
| **Swing Length** | Pivot detection range | 5 | Short-term: 3 / Long-term: 7-10 |
| **Use Close** | Use closing price (true) or wick (false) | false | Close recommended (fewer false signals) |
| **Extend Lines** | Extend lines to the right | true | ON recommended |
| **Keep History Lines** | Number of historical lines to display | 3 | 3-5 for clarity |
| **Alert On** | Enable reversal alerts | true | ON recommended |

---

## 📚 Use Cases

### Case 1: Uptrend Entry
1. Price rising (blue solid defense line visible)
2. New pullback forms → blue solid line updates to new HL
3. Old defense line turns to dashed (untested status)
4. Price falls back to dashed line → watch for bounce!
5. If bounce occurs, dashed line changes to dotted

### Case 2: Trend Reversal Detection
1. During uptrend (blue solid line)
2. Price breaks below defense line
3. ▲ LOW marker appears (Low Reversal)
4. Trend shifts to downtrend (red solid line appears)
5. Consider closing longs or entering shorts

---

## 🎓 Best Practices

### ✅ Effective Use Cases
- **Swing Trading**: Daily/4H timeframe trend following
- **Pullback Trading**: Wait for price to return to defense lines
- **Stop Loss Placement**: Set stops just below/above defense lines
- **Scenario Adjustment**: Use ▲▼ markers to recognize trend shifts

### ⚠️ Important Notes
- **Not recommended as standalone**: Use with other indicators and market context
- **Less effective in ranging markets**: Works best in trending conditions
- **Backtest recommended**: Verify performance with your trading style

---

## 🌟 Summary

**Structural Reversal** faithfully implements Dow Theory to help you never miss important trend reversals.

The **"untested line" concept (dashed lines)** provides a novel approach to visualizing the "freshness" of support/resistance levels.

### Ideal For
- Traders who want to incorporate Dow Theory
- Those seeking objective entry/exit points
- Pullback and swing traders
- Anyone who wants to catch trend reversals early

---

## 📝 Technical Details

- **No Repaint**: All signals based on confirmed bars
- **Lightweight**: Optimized for performance
- **Customizable**: Flexible parameters for different trading styles
- **Alert Ready**: Built-in alert conditions for notifications

---

**Category**: Trend Analysis
**Tags**: #dowtheory #trend #reversal #structure #pivotpoints #supportresistance

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.