Super Signal Alert Modified3

Download script
Author: Copyright ?2006, Nick Bilak
Super Signal Alert Modified3

This script is a specialized technical analysis tool designed to identify significant price turning points on a trading chart. Its primary purpose is to filter out market "noise" and highlight moments where the price reaches a peak or a trough within a specific timeframe, providing visual and audible cues for potential trading opportunities.

How the Logic Works

The script operates by constantly scanning the historical price action of your chosen currency pair or asset. It focuses on a fixed window of recent price data (defined as a "distance" parameter) to determine where the highest and lowest prices have occurred relative to the current market moment.

1. Identifying Peaks and Troughs The tool looks for the highest point (the "High") and the lowest point (the "Low") within a set range of recent candles. When the script detects that the current price has reached a new high or low compared to that surrounding window, it prepares to generate a signal.

2. Signal Generation

  • Sell Signals: When the price hits a peak (a local high), the script identifies this as a potential reversal point. It places a red arrow on the chart slightly above that high price.
  • Buy Signals: When the price hits a trough (a local low), the script identifies this as a potential upward move. It places a lime-colored arrow on the chart slightly below that low price.

3. Smart Filtering and Alerts To prevent "false signals" or repetitive alerts during a steady trend, the logic includes a smart switching mechanism. The script is designed to only trigger a notification once per direction; it effectively waits for a new peak to be established before confirming a Sell signal, and a new trough before confirming a Buy signal. This ensures you aren't bombarded with notifications during a single sustained price movement.

4. Real-Time Notifications Beyond just drawing arrows on the screen, the script can act as an active monitoring system. Depending on your settings, it can:

  • Audible Alerts: Play a sound immediately when a new signal is confirmed.
  • Pop-up Alerts: Display a text box on your trading platform with the specific price and time of the move.
  • Email Notifications: Send an automated email to your device containing the exact details of the trade setup, including the current Ask and Bid prices, the symbol, and the timeframe.

Summary for the User

In simple terms, this script acts as an automated "scout." It watches the market 24/7, finds the highest and lowest points in recent price action, and alerts you exactly when those points are hit, allowing you to react to potential trend changes without having to stare at the charts constantly.

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
12 Views
0 Downloads
0 Favorites
Super Signal Alert Modified3
//+------------------------------------------------------------------+
//|                                                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("Super Signal Sell ",  Symbol(), "  " ,Period(), " 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("Super Signal Buy ", Symbol(), "  " ,Period(), " 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