super_signals_v2_Alert

Download script
Author: Copyright � 2006, Nick Bilak
super_signals_v2_Alert

This script is designed to function as a visual and audible alerting tool for traders who want to identify significant structural turning points in the market. Rather than following every minor price fluctuation, the logic focuses on identifying local "peaks" and "valleys" to help highlight potential entry or exit zones.

Core Trading Logic

The script operates by scanning the market history and current price action using a specific look-back window (a defined range of recent candles). It continuously monitors for two primary conditions:

1. Identifying Local Highs (Resistance) The system searches for the highest price point within its designated window. When it detects that a candle has reached this peak, it identifies a "Buy" signal area. It places a visual marker slightly above this high point to signify that the market has reached a local ceiling.

2. Identifying Local Lows (Support) Conversely, the system scans for the lowest price point within the same window. When a candle hits this bottom level, it identifies a "Sell" signal area and places a visual marker slightly below this low point to highlight a local floor.

Smart Filtering and Alerts

To ensure the user is not overwhelmed with constant notifications, the script includes a specific logic filter:

  • Confirmation Check: The tool is programmed to trigger active alerts only when a new signal is confirmed on the most recent completed candle.
  • Signal Alternation: It features an internal "flag" system. This prevents the script from sending multiple consecutive alerts for the same direction. For example, if it identifies a Buy signal, it will wait for a Sell signal to be detected before notifying you of another potential move. This helps filter out "noise" in a trending market where price might hit several local highs in a row.

User Notifications

When the logic confirms a new peak or valley based on the rules above, the script provides three types of feedback:

  • Visual Markers: Distinctive arrows appear directly on your chart at the identified levels.
  • Audio Alerts: An immediate sound notification is played to grab your attention.
  • Email Notifications: If enabled, a detailed message is sent to your email, containing the exact price (Ask and Bid), the specific time of the occurrence, the currency pair being traded, and the current timeframe.
Price Data Components
Series array that contains open time of each bar
Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screenIt sends emails
13 Views
1 Downloads
0 Favorites
super_signals_v2_Alert
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                super-signals.mq4 |
//|                Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
//| Modified by Robert Hill to do alert or send email                |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link      "http://www.forex-tsd.com/"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_color2 Lime
#property indicator_width2 2

extern int SignalGap = 4;

extern bool SoundON=true;
extern bool EmailON=false;

int dist=24;
double b1[];
double b2[];
int flagval1 = 0;
int flagval2 = 0;

int init()  {
   SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
   SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
   SetIndexArrow(1,233);
   SetIndexArrow(0,234);
   SetIndexBuffer(0,b1);
   SetIndexBuffer(1,b2);
   return(0);
}
int start() {
   int counted_bars=IndicatorCounted();
   int k,i,j,limit,hhb,llb;
   
   if (counted_bars<0) return(-1);
   if (counted_bars>0) counted_bars--;
   limit=Bars-1;
   if(counted_bars>=1) limit=Bars-counted_bars-1;
   if (limit<0) limit=0;

   for (i=limit;i>=0;i--)   {
      hhb = Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
      llb = Lowest(NULL,0,MODE_LOW,dist,i-dist/2);

      if (i==hhb)
      {
         if (i == 1 && flagval1==0)
         {
           flagval1=1;
           flagval2=0;
           if (SoundON) Alert("BUY signal at Ask=",Ask,"\n Bid=",Bid,"\n Time=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime()),"\n Symbol=",Symbol()," Period=",Period());
           if (EmailON) SendMail("BUY signal alert","BUY signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
         }
         b1[i]=High[hhb]+SignalGap*Point;
      }
      if (i==llb)
      {
         if (i == 1 && flagval2==0)
         {
           flagval2=1;
           flagval1=0;
           if (SoundON) Alert("SELL signal at Ask=",Ask,"\n Bid=",Bid,"\n Date=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime()),"\n Symbol=",Symbol()," Period=",Period());
           if (EmailON) SendMail("SELL signal alert","SELL signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
         }
         b2[i]=Low[llb]-SignalGap*Point;
      }
   }
   return(0);
}


Comments