OPEN-SOURCE SCRIPT
stelaraX - Market Structure

stelaraX – Market Structure
stelaraX – Market Structure is a technical analysis indicator designed to visualize swing structure and trend transitions using pivot-based market structure logic. The script identifies swing highs and swing lows, classifies them into structure types, and highlights key events such as Break of Structure (BOS) and Change of Character (CHoCH).
The indicator is built to provide a clear, rule-based view of price structure across any market and timeframe.
For advanced AI-based chart analysis and automated structure interpretation, visit stelarax.com
Core logic
The script detects swing points using pivot highs and pivot lows with a user-defined swing length.
Swing highs are classified as:
* HH when a new swing high is higher than the previous swing high
* LH when a new swing high is lower than the previous swing high
Swing lows are classified as:
* HL when a new swing low is higher than the previous swing low
* LL when a new swing low is lower than the previous swing low
Structure points can be displayed with labels and connected by dashed structure lines.
BOS and CHoCH
Break of Structure is detected when price closes through the most recent swing level:
* bullish BOS when price crosses above the last swing high during a bullish trend
* bearish BOS when price crosses below the last swing low during a bearish trend
Change of Character is highlighted as a potential trend transition:
* bearish CHoCH when a lower high forms after a bullish trend
* bullish CHoCH when a higher low forms after a bearish trend
Both BOS and CHoCH can be enabled or disabled independently.
Visualization
The indicator can display:
* swing point labels for HH, HL, LH, and LL
* dashed structure lines between consecutive swing points
* BOS labels and horizontal BOS lines at the broken swing level
* optional background shading based on the detected trend state
Colors, label size, and line width are configurable.
Alerts
Alert conditions are available for:
* bullish break of structure
* bearish break of structure
* new higher high detection
* new lower low detection
Use case
This indicator is intended for:
* market structure mapping using swing highs and swing lows
* identifying BOS events for continuation confirmation
* spotting CHoCH for potential trend transitions
* trend bias visualization and structure-based analysis
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com.
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
stelaraX – Market Structure is a technical analysis indicator designed to visualize swing structure and trend transitions using pivot-based market structure logic. The script identifies swing highs and swing lows, classifies them into structure types, and highlights key events such as Break of Structure (BOS) and Change of Character (CHoCH).
The indicator is built to provide a clear, rule-based view of price structure across any market and timeframe.
For advanced AI-based chart analysis and automated structure interpretation, visit stelarax.com
Core logic
The script detects swing points using pivot highs and pivot lows with a user-defined swing length.
Swing highs are classified as:
* HH when a new swing high is higher than the previous swing high
* LH when a new swing high is lower than the previous swing high
Swing lows are classified as:
* HL when a new swing low is higher than the previous swing low
* LL when a new swing low is lower than the previous swing low
Structure points can be displayed with labels and connected by dashed structure lines.
BOS and CHoCH
Break of Structure is detected when price closes through the most recent swing level:
* bullish BOS when price crosses above the last swing high during a bullish trend
* bearish BOS when price crosses below the last swing low during a bearish trend
Change of Character is highlighted as a potential trend transition:
* bearish CHoCH when a lower high forms after a bullish trend
* bullish CHoCH when a higher low forms after a bearish trend
Both BOS and CHoCH can be enabled or disabled independently.
Visualization
The indicator can display:
* swing point labels for HH, HL, LH, and LL
* dashed structure lines between consecutive swing points
* BOS labels and horizontal BOS lines at the broken swing level
* optional background shading based on the detected trend state
Colors, label size, and line width are configurable.
Alerts
Alert conditions are available for:
* bullish break of structure
* bearish break of structure
* new higher high detection
* new lower low detection
Use case
This indicator is intended for:
* market structure mapping using swing highs and swing lows
* identifying BOS events for continuation confirmation
* spotting CHoCH for potential trend transitions
* trend bias visualization and structure-based analysis
For a fully automated AI-driven chart analysis solution, additional tools and insights are available at stelarax.com.
Disclaimer
This indicator is provided for educational and technical analysis purposes only and does not constitute financial advice or trading recommendations. All trading decisions and risk management remain the responsibility of the user.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.