Author: Kalenzo
Alert_SAR

This tool is designed to act as an automated monitoring system for traders using the Parabolic SAR (Stop and Reverse) indicator on MetaTrader. Its primary purpose is to provide instant notifications whenever the technical trend identified by the indicator undergoes a significant shift.

How it Works

The logic follows a straightforward observation process:

  • Trend Tracking: The script constantly monitors the current price action in relation to the Parabolic SAR calculation. This indicator is commonly used to identify whether a market is currently in an upward (bullish) or downward (bearish) trend.
  • Change Detection: It specifically looks for "crossover" moments—points where the Sar value flips its position relative to the price. For example, if the indicator was previously below the price and moves above it, or vice versa, the script recognizes this as a potential change in market direction.
  • Instant Notification: The moment the script detects this reversal, it triggers an automated alert. This allows you to stay updated on trend changes in real-time without having to constantly stare at the charts.

Key Benefits for the User

  • Real-Time Awareness: Instead of manually checking if a trend has reversed, the system pushes an alert to you the second the logic conditions are met.
  • Simplified Monitoring: By focusing specifically on the "flip" point of the Parabolic SAR, it filters out general market noise and highlights only the moments where the technical trend potentially reverses.
  • Versatility: Since it monitors the live price feed, it works across different symbols and timeframes, providing a consistent alerting method for your trading strategy.
Indicators Used
Parabolic Stop and Reverse system
Miscellaneous
It issuies visual alerts to the screen
6 Views
0 Downloads
0 Favorites
Alert_SAR
//+------------------------------------------------------------------+
//|                                                    Alert_SAR.mq4 |
//|                                                          Kalenzo |
//|                                      bartlomiej.gorski@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link      "bartlomiej.gorski@gmail.com"
extern int range = 1;
extern double step = 0.02;
extern double maximum = 0.2;
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
 {
//----
  double sar = iSAR(Symbol(),0,step,maximum,0); 
  double psar = iSAR(Symbol(),0,step,maximum,1); 
  
  if( (sar > Open[0] && psar < Open[1]) || (sar < Open[0] && psar > Open[1]) )
  Alert(Symbol()+" SAR changed ");
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments