OPEN-SOURCE SCRIPT
Cập nhật Market Structure

This indicator identifies market structure shifts by tracking confirmed swing highs and swing lows using pivot-based price action. A BUY signal is generated when price closes above the most recent confirmed swing high, while a SELL signal is generated when price closes below the most recent confirmed swing low. The script also maintains directional bias, highlights bullish or bearish conditions with optional background coloring, and plots the active swing reference levels directly on the chart.
“Bars Left” controls how many candles are used to validate a swing high or swing low, while “Bars Right” determines how many candles must confirm the pivot before it becomes valid. Higher values create stronger but slower structure levels, while lower values react faster but may produce more noise. “Show BUY / SELL Labels” enables or hides signal labels on the chart. “Show Background Bias” colors the chart background based on the current bullish or bearish structure bias. “Show Swing Reference Levels” displays the active prior swing high and swing low levels used for structure break confirmation. “Non-Repaint Mode” waits for candle confirmation before signals are allowed, helping reduce repaint behavior during live market conditions.
This tool is designed for structure-based trend confirmation and breakout continuation analysis. Conservative traders typically use higher pivot settings to focus on major market structure, while aggressive traders may reduce pivot settings for faster directional shifts and earlier entries.
“Bars Left” controls how many candles are used to validate a swing high or swing low, while “Bars Right” determines how many candles must confirm the pivot before it becomes valid. Higher values create stronger but slower structure levels, while lower values react faster but may produce more noise. “Show BUY / SELL Labels” enables or hides signal labels on the chart. “Show Background Bias” colors the chart background based on the current bullish or bearish structure bias. “Show Swing Reference Levels” displays the active prior swing high and swing low levels used for structure break confirmation. “Non-Repaint Mode” waits for candle confirmation before signals are allowed, helping reduce repaint behavior during live market conditions.
This tool is designed for structure-based trend confirmation and breakout continuation analysis. Conservative traders typically use higher pivot settings to focus on major market structure, while aggressive traders may reduce pivot settings for faster directional shifts and earlier entries.
Phát hành các Ghi chú
Internal defaults updated.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.