Support-Resistance
17 $
12 $
This code is an MT4 (MetaTrader 4) indicator designed to identify Support and Resistance (S&R) levels and send alerts when these levels are breached
Support and Resistance Indicator, Support and resistance levels
This is an MT4 (MetaTrader 4) indicator designed to identify Support and Resistance (S&R) levels and send alerts when these levels are breached.
Features
- Uses two buffers to store Support and Resistance levels.
- Configures color, width, and type of lines (displayed as arrows).
- Supports alerts via:
- Native in-platform notifications
- Push notifications
- Allows users to check breaches based on the current or previous candle.
Functions
1. OnInit
Initializes the indicator:
- Sets up buffers for Support and Resistance levels.
- Configures how data is displayed on the chart using arrows.
2. OnCalculate
Handles the main calculation logic:
- Uses the built-in Fractals indicator to calculate Resistance (upper fractals) and Support (lower fractals).
- If no new level is detected, the previous level is retained for continuity.
- Checks for breaches:
- If the price closes above a Resistance level, an alert is sent for a "Resistance Breakout".
- If the price closes below a Support level, an alert is sent for a "Support Breakout".
- Users can customize alert conditions and timing.
Alerts
Alert messages include the following details:
- Symbol
- Timeframe
- Broken level (Support or Resistance)
- Corresponding price
Alerts are sent using MetaTrader's built-in functions, based on user preferences.
Purpose
This indicator is ideal for traders who need an automated way to identify Support and Resistance breaches and receive timely notifications for potential trading opportunities.