PROTECTED SOURCE SCRIPT

Tradehook.tech-MTMGBS-PatternFinder

33
# TH_MTMGBS_PatternFinder
### M/W Pattern & Double Top/Bottom Detection

**Category:** Patterns | **Overlay:** Yes | **Complexity:** ⭐⭐⭐⭐ | **Version:** 2.2

M PATTERN (Bearish):
Peak1 (High Vol) Peak2 (Low Vol) ← Declining volume = bearish divergence
/\ /\
/ \ ✓Vol / \
/ \ Decline / \____
/ \_/ / Break

W PATTERN (Bullish):
Trough1 (High Vol) Trough2 (Low Vol) ← Declining volume = selling exhaustion
\ /¯¯¯¯\ /
\ / \ / ✓Vol
\ / \ / Decline
\/ \/____
Break

#### Description
PatternFinder detects M patterns (bearish) and W patterns (bullish) with three variants each.
Now includes **optional volume confirmation** to filter for higher-probability setups.

#### Pattern Variants
| M Patterns (Bearish) | W Patterns (Bullish) |
|---------------------|----------------------|
| Double Top (Equal Highs) | Double Bottom (Equal Lows) |
| Lower High M | Higher Low W |
| Higher High M (Failed BO) | Lower Low W (Failed BD) |

#### Key Parameters
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| `swingStrength` | 5 | 2-20 | Pivot detection sensitivity |
| `maxPatternBars` | 100 | 20-300 | Max bars for pattern width |
| `minPatternBars` | 10 | 5-50 | Min bars for pattern width |
| `equalTolerance` | 0.3 | 0.1-1.0 | ATR multiplier for "equal" peaks |
| `minPatternHeight` | 1.0 | 0.5-5.0 | Min height in ATR units |
| `useVolumeFilter` | false | - | Require volume confirmation |
| `volumeDeclinePercent` | 20% | 5-50% | Min volume decline required |

#### Pattern Validation Rules
1. ✓ Correct swing sequence (H-L-H for M, L-H-L for W)
2. ✓ Pattern width within min/max bar limits
3. ✓ Pattern height meets minimum ATR threshold
4. ✓ Peak/trough difference within ATR tolerance
5. ✓ Price breaks neckline (with buffer) for confirmation
6. ✓ Volume declining on second peak/trough (optional)

#### Best Use Cases
✅ Reversal trading at significant levels
✅ Target calculation using measured move principle
✅ High-probability setups with volume confirmation
✅ Failed breakout/breakdown detection

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.