Market Structure Event TrendThis indicator identifies and visualizes advanced market structure
concepts (SMC) alongside classic price action analysis. It combines
robust, non-repainting pivot detection with a sophisticated engine
that tracks dual-layer trend states, structural breaks (BOS/CHoCH),
and supply/demand zones (Order Blocks).
Key Features:
1. **Non-Repainting Pivot Detection:**
- Uses a standard lookback method (`left` and `right` bars) to
identify historical pivot points.
- **Note on Confirmation:** Pivots are only confirmed *after*
the `Pivot Right Bars` input has passed. This is essential
for ensuring the signal is non-repainting, but it
introduces an inherent lag.
- Automatically classifies the sequence of pivots according to
Dow Theory: Higher Highs (HH), Higher Lows (HL), Lower Highs (LH),
and Lower Lows (LL).
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library
2. **Smart Money Concepts (SMC) Engine:**
- **Dual-Layer Structure:** The engine distinguishes between significant
**Major Structure** (Swing Points) and internal **Minor Structure**
(Sub-Structure). This allows traders to separate the overarching trend
from immediate order flow.
- **Event Detection:** Automatically identifies and visualizes key events:
- **BOS (Break of Structure):** Signals trend continuation when a
validated High/Low is broken in the direction of the trend.
- **CHoCH (Change of Character):** Signals a potential trend reversal
when a significant structural level is breached against the trend.
- **Pivot Classification:** Applies classic labels (HH, HL, LH, LL)
while also detecting Equal Highs (EH) and Equal Lows (EL) based on
a user-defined price tolerance.
3. **Automated Order Blocks:**
- Identifies potential Supply and Demand zones (Order Blocks) formed
at the precise origin of a structural break.
- **Mitigation Tracking:** The indicator monitors price action in real-time
and automatically removes or updates Order Blocks once they have been
mitigated (tested/broken) by the price.
- **Scope Awareness:** Distinguishes between Major Order Blocks (Swing origin)
and Minor Order Blocks (Internal flow origin).
4. **Trend State Visualization & Dynamic S/R:**
- A robust state machine analyzes the sequence of events to determine
the current market trend (Bullish, Bearish, or Neutral) for both
Major and Minor scopes.
- **Dynamic Step-Lines:** Visualizes the trend structure directly on the
chart, creating a "staircase" effect that highlights trailing stop levels.
- **Extended Pivot Lines:** Extends dynamic horizontal lines from confirmed
pivots that act as Support/Resistance and automatically terminate
upon a structural break.
5. **Full Customization & Alerts:**
- **Display Options:** Granular control over the visibility of Events,
Labels, Symbols, and Lines. Supports "Relative" vs "Absolute" price
change display.
- **Visual Styling:** Extensive color customization for Bullish/Bearish
scenarios and Major/Minor hierarchy.
- **Comprehensive Alerts:** Set up precise alerts for:
- New Pivot formations (e.g., "Pivot Higher High").
- Structural Events (e.g., "Major Bullish BOS detected").
- Trend State Changes (e.g., "Major Trend changed to Bullish",
"Minor Trend no longer Bearish").
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Event
Event Marking [zidaniee]This is not a technical analysis indicator, but a visual tool designed to mark important global events using vertical lines on your chart.
By placing a single marker at the exact time an event occurred, you can compare how different assets reacted to that global event — before, during, and after it happened.
In the example provided, the marking corresponds to the moment when U.S. President Donald Trump announced a 100% tariff on goods from China, which was immediately reflected in market reactions worldwide.
The indicator includes full customization features for:
• Event label text
• Label size and position
• Line color, style, and width
Enjoy
Economic Event DatesThis TradingView indicator ("Economic Event Dates") plots significant economic event dates directly on your chart, helping you stay informed about potential market-moving announcements. It includes pre-configured dates for:
* **FOMC Meetings:** Key policy meetings of the Federal Open Market Committee.
* **CPI Releases:** Consumer Price Index data releases, a key measure of inflation.
* **Bitcoin Halvings:** Programmatic reductions in Bitcoin's new supply issuance.
**Features:**
* **Customizable Dates:** Easily input and manage dates for FOMC, CPI, and Halving events for current and future years (2025, 2026, and beyond for Halvings).
* **Visual Cues:** Displays vertical lines on the chart at the precise time of each event.
* **Event Labels:** Shows clear labels (e.g., "FOMC", "CPI", "Halving") for each event line.
* **Color Coding:** Distinct colors for FOMC (blue), CPI (orange), and Halving (purple) events for quick identification.
* **Future Events Focus:** Option to display only upcoming events relative to the current real time.
* **Morning Alerts:** (Optional) Triggers an alert on the morning of a scheduled event, providing a timely reminder.
* **Customizable Appearance:** Adjust line width and toggle label visibility.
**How to Use:**
1. Add the indicator to your TradingView chart.
2. Review and update the input dates for FOMC, CPI, and Halving events in the indicator settings. The script includes placeholders and notes for future dates that may require verification from official sources (e.g., federalreserve.gov, bls.gov).
3. Customize colors, line width, label visibility, and alert preferences as needed.
4. Observe the vertical lines on your chart indicating upcoming economic events.
This tool is designed for traders and investors who want to incorporate awareness of major economic events into their market analysis. Remember to verify future event dates as they are officially announced.
Created by YouNesta
Function - Entropy Gini Indexfunction to retrieve Gini Impurity / Gini Index.
reference:
- victorzhou.com
- en.wikipedia.org
test - event distributiondisplays the distribution of the outcome of a event over the last event.
similar to this script:




