### Market Structure & Session Alerts Indicator
#### Overview
The "Market Structure & Session Alerts" indicator is a comprehensive tool designed to assist traders in identifying key market structure levels, detecting liquidity sweeps, and receiving alerts for specific trading sessions. This indicator is particularly useful for traders who want to keep an eye on previous high and low levels and be alerted during pre-London and pre-New York sessions.
#### Features
1. **Previous High/Low Levels:**
- **Daily, Weekly, and Monthly Highs and Lows:** The indicator plots the previous day, week, and month high and low levels on the chart. These levels can be crucial for identifying support and resistance zones.
- **Toggle Display:** Users can choose to show or hide these levels using the "Show Previous Day/Week/Month High/Low" option.
2. **Liquidity Sweep Detection:**
- **Liquidity Sweep Identification:** The indicator detects liquidity sweeps when the current price closes above the previous day's high. This can signal potential reversals or continuations in the market.
- **Visual Alerts:** When a liquidity sweep is detected, a green triangle is plotted below the bar.
3. **Session Alerts:**
- **Session Timings:** Users can set specific start and end times for the pre-London and pre-New York sessions to match their timezone.
- **Visual Background Highlight:** The background of the chart is highlighted in yellow during the defined session times to provide a visual cue.
- **Alert Messages:** The indicator can generate alerts to notify traders when the market enters the pre-London or pre-New York session.
4. **Current Price Line:**
- The current price is plotted as a black line, providing a clear visual reference for the current market price.
#### How to Use
1. **Input Parameters:**
- `Show Previous Day/Week/Month High/Low`: Enable or disable the display of previous high/low levels.
- `Show Liquidity Sweep`: Enable or disable the detection and display of liquidity sweeps.
- `Show Session Alerts`: Enable or disable session alerts and background highlights.
2. **Session Timing Adjustments:**
- Set the `Pre-London Start`, `Pre-London End`, `Pre-New York Start`, and `Pre-New York End` times according to your timezone to ensure accurate session alerts.
3. **Alerts:**
- Make sure alerts are enabled in your TradingView settings to receive notifications when the market enters the pre-London or pre-New York sessions.
#### Example Use Cases
- **Day Traders:** Identify potential support and resistance levels using the previous day's high and low.
- **Swing Traders:** Use weekly and monthly high and low levels to determine significant market structure points.
- **Scalpers:** Detect liquidity sweeps to identify potential quick trades.
- **Session Traders:** Be alerted when the market enters key trading sessions to align your trading strategy with major market activities.
This indicator combines multiple market analysis tools into one, providing a robust system for traders to enhance their trading decisions and market awareness.