OPEN-SOURCE SCRIPT
Swing Elite Trend Direction [Free]

Swing Elite Trend Direction [Free]
This indicator automatically identifies and labels market structure by detecting swing highs and swing lows, then classifying them as Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL).
🔍 What It Does
The indicator uses a depth-based pivot detection algorithm to find significant swing points in price action. Each swing is then compared to the previous swing of the same type to determine the market structure:
HH (Higher High): Current swing high is above the previous swing high → bullish structure
HL (Higher Low): Current swing low is above the previous swing low → bullish structure
LH (Lower High): Current swing high is below the previous swing high → bearish structure
LL (Lower Low): Current swing low is below the previous swing low → bearish structure
📈 How To Use
Trend Identification:
Bullish trend is confirmed when you see HH followed by HL (or HL followed by HH)
Bearish trend is confirmed when you see LL followed by LH (or LH followed by LL)
The zigzag line color changes based on confirmed trend direction
Trade Setups:
In a bullish trend, look for pullbacks to HL areas for long entries
In a bearish trend, look for rallies to LH areas for short entries
Trend changes are signaled when structure breaks (e.g., bullish trend making a LL)
Depth Setting:
Higher depth values (e.g., 34-55) capture major swings for higher timeframe analysis
Lower depth values (e.g., 8-21) capture minor swings for shorter-term trading
Adjust based on your trading style and timeframe
This indicator automatically identifies and labels market structure by detecting swing highs and swing lows, then classifying them as Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL).
🔍 What It Does
The indicator uses a depth-based pivot detection algorithm to find significant swing points in price action. Each swing is then compared to the previous swing of the same type to determine the market structure:
HH (Higher High): Current swing high is above the previous swing high → bullish structure
HL (Higher Low): Current swing low is above the previous swing low → bullish structure
LH (Lower High): Current swing high is below the previous swing high → bearish structure
LL (Lower Low): Current swing low is below the previous swing low → bearish structure
📈 How To Use
Trend Identification:
Bullish trend is confirmed when you see HH followed by HL (or HL followed by HH)
Bearish trend is confirmed when you see LL followed by LH (or LH followed by LL)
The zigzag line color changes based on confirmed trend direction
Trade Setups:
In a bullish trend, look for pullbacks to HL areas for long entries
In a bearish trend, look for rallies to LH areas for short entries
Trend changes are signaled when structure breaks (e.g., bullish trend making a LL)
Depth Setting:
Higher depth values (e.g., 34-55) capture major swings for higher timeframe analysis
Lower depth values (e.g., 8-21) capture minor swings for shorter-term trading
Adjust based on your trading style and timeframe
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.