OPEN-SOURCE SCRIPT

stelaraX - Market Structure

162
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.

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。