• Products
  • Community
  • Markets
  • Brokers
  • More
Get started
  • Community
  • /Indicators and strategies
  • /Swinghighbreak

Swinghighbreak

Simple Market StructureThis indicator is meant for education and experimental purposes only. Many Market Structure Script out there isn't open-sourced and some could be complicated to understand to modify the code. Hence, I published this code to make life easier for beginner programmer like me to modify the code to fit their custom indicator. As I am not a expert or pro in coding it might not be as accurate as other reputable author. Any experts or pros that is willing to contribute this code in the comment section below would be appreciated, I will modify and update the script accordingly as part of my learning journey. It is useful to a certain extend to detect Market Structure using Swing High/Low in all market condition. Here are some points that I am looking to improve / fix: To fix certain horizontal lines that does not paint up to the point where it breaks through. To add in labels when a market structure is broken. Allow alerts to be sent when market structure is broken (Probably be done in the last few updates after knowing it is stable and as accurate as possible) Any suggested improvement, please do let me know in the comment section below and I will try my best to implement it into the script.
Pine Script® indicator
by RrBc2
55

Select market data provided by ICE Data services. Select reference data provided by FactSet. Copyright © 2025 FactSet Research Systems Inc.© 2025 TradingView, Inc.

More than a product
  • Supercharts
Screeners
  • Stocks
  • ETFs
  • Bonds
  • Crypto coins
  • CEX pairs
  • DEX pairs
  • Pine
Heatmaps
  • Stocks
  • ETFs
  • Crypto
Calendars
  • Economic
  • Earnings
  • Dividends
More products
  • Yield curves
  • Options
  • News Flow
  • Pine Script®
Apps
  • Mobile
  • Desktop
Community
  • Social network
  • Wall of Love
  • Refer a friend
  • House Rules
  • Moderators
Ideas
  • Trading
  • Education
  • Editors' picks
Pine Script
  • Indicators & strategies
  • Wizards
  • Freelancers
Tools & subscriptions
  • Features
  • Pricing
  • Market data
Trading
  • Overview
  • Brokers
Special offers
  • CME Group futures
  • Eurex futures
  • US stocks bundle
About company
  • Who we are
  • Manifesto
  • Athletes
  • Blog
  • Careers
  • Media kit
Merch
  • TradingView store
  • Tarot cards for traders
  • The C63 TradeTime
Policies & security
  • Terms of Use
  • Disclaimer
  • Privacy Policy
  • Cookies Policy
  • Accessibility Statement
  • Security vulnerability
  • Status page
Business solutions
  • Widgets
  • Charting libraries
  • Lightweight Charts™
  • Advanced Charts
  • Trading Platform
Growth opportunities
  • Advertising
  • Brokerage integration
  • Partner program
  • Education program
Community
  • Social network
  • Wall of Love
  • Refer a friend
  • House Rules
  • Moderators
Ideas
  • Trading
  • Education
  • Editors' picks
Pine Script
  • Indicators & strategies
  • Wizards
  • Freelancers
Business solutions
  • Widgets
  • Charting libraries
  • Lightweight Charts™
  • Advanced Charts
  • Trading Platform
Growth opportunities
  • Advertising
  • Brokerage integration
  • Partner program
  • Education program
Look FirstLook First