Downloading...
OPEN-SOURCE SCRIPT
Updated

Trapper Market Structure (HH, HL, LH, LL)

1 532
This script is designed to visually identify price action market structure in real time using pivot-based logic. It highlights the key components of trend direction by labeling:

- **HH** – Higher Highs
- **HL** – Higher Lows
- **LH** – Lower Highs
- **LL** – Lower Lows

These labels help traders track evolving market conditions and spot trend continuations, breaks in structure, or potential reversals — all without guessing.

**How It Works**
The script detects local swing highs and lows based on a customizable pivot strength. Once a valid pivot is confirmed, it’s classified in context with the previous relevant pivot to determine its structural significance.

For example:
- If a pivot high is higher than the previous, it’s marked as a **HH**.
- If a pivot low is lower than the previous, it’s marked as a **LL**, and so on.

This running analysis helps traders anticipate shifts between bullish and bearish structures.

**Customizable Features**
- Adjust **Pivot Strength** to increase or reduce sensitivity (more reactive or more stable)
- Toggle **Labels** on/off for cleaner charts
- Toggle **Connecting Lines** between pivots to visualize structure flow

**Use Case**
This indicator is ideal for:
- Price action traders
- Market structure analysis
- Identifying entry zones during pullbacks (e.g., buying at HLs during uptrends)
- Confirming trend reversals or break-of-structure (BoS)

You can use this tool as a foundation for more advanced systems such as CHoCH/BOS detection, liquidity zones, or sniper-style entry frameworks.

**Concepts Used**
- Swing High/Low detection using `ta.pivothigh` and `ta.pivotlow`
- Market structure labeling logic
- Visual flow to reinforce trader psychology on trend states

Disclaimer
This script is provided for educational purposes only. It is not financial advice and should not be relied upon for trading decisions. Always conduct your own analysis and risk management.

#marketstructure #priceaction #technicalanalysis #tradingviewopen #pivotpoints
Release Notes
What’s New in This Version:

Alert Support (HH, HL, LH, LL)
You can now set real-time alerts when any of the market structure points are formed:

Higher High (HH)

Higher Low (HL)

Lower High (LH)

Lower Low (LL)

Color Customization
We’ve added full flexibility to customize the colors of:

Labels for Highs and Lows

Connecting lines between pivots

You’ll find these under the “Inputs” tab (not “Style”), so you can tweak visuals without touching code.

Why This Matters:
This upgrade helps traders stay on top of structure shifts with instant alerts and allows full chart visual tailoring to fit any setup.

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.