super_signals_v2_Alert_v1

Download script
Author: Copyright � 2006, Nick Bilak
super_signals_v2_Alert_v1

This tool is designed to identify specific price movement patterns on a trading chart by monitoring "peaks" and "valleys" in the market. Instead of following every minor fluctuation, it looks for significant high and low points over a defined period to help traders spot potential entry or exit opportunities.

Core Logic and Functionality

Identifying Market Extremes The script constantly scans a specific window of historical price data (determined by a set distance). It is looking for two primary conditions:

  • Local Highs: The highest price reached within that specific timeframe.
  • Local Lows: The lowest price reached within that same timeframe.

Signal Generation When the script identifies a new peak or valley, it places a visual marker on your chart.

  • Buy Signals: When a significant low point is detected, the script generates a signal (represented by a specific arrow), suggesting that the price may be at a底点 and could move upward.
  • Sell Signals: When a significant high point is detected, the script generates a signal, suggesting that the price may be at a ceiling and could move downward.

Smart Filtering and Spacing To prevent your screen from becoming cluttered with overlapping signals, the logic includes two key features:

  1. Signal Gap: It places the visual arrows a small distance away from the actual candle to ensure they are clearly visible and do not overlap with the price bars.
  2. Sequential Logic: The script is designed to toggle between Buy and Sell states. It ensures that you don't receive multiple consecutive signals of the same type, helping to filter out "noise" and highlight clear changes in market direction.

Real-Time Notifications

Beyond just placing arrows on your chart, the script can be configured to act as an active monitoring system. Depending on your preferences, it can provide immediate notifications when a new signal is detected:

  • Audible Alerts: It can trigger a sound on your computer to grab your attention instantly.
  • Pop-up Alerts: It can display a text box on your trading platform showing the current price, time, and currency pair.
  • Email Notifications: It can send a detailed summary directly to your email inbox, allowing you to keep track of market signals even when you are away from your trading station.
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
7 Views
0 Downloads
0 Favorites
super_signals_v2_Alert_v1
//+------------------------------------------------------------------+
//|                                                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