Trading: Sound Alerts in Indicators

 

New article Sound Alerts in Indicators has been published:

How to create "voice" indicators for daily usage.

Though automated trading becomes more and more popular, many traders still practice manual trading. So, where an Expert Advisor needs some milliseconds to evaluate the current market situation, a human will spend much time, power and - which is most important - attention.

As a couple of years before, many traders use one or more Technical Indicators. Some strategies consider indicator values on several timeframes simultaneously.

So, how can one "catch" an important signal? There are several choices:

  • write an Expert Advisor that would analyze the market and alert about important events;
  • sit in front of the monitor and , switching between tens of charts, try to analyze the information from all of them;
  • add an alerting system into all indicators used.

The first choice is, in my opinion, the most proper. But it demands either programming skills or money to pay for realization. The second way is very time consuming, tiring, and inefficient. The third choice is a cross between the former two ways. One needs much fewer skills and less time to implement it, but it can really better the lot of the user trading manually.

It is the implementation of the third choice that the article is devoted to. After having read it, every trader will be able to add convenient alerts into indicators.

Author: Andrey Khatimlianskii

 
Thanks Andrey. Pretty Clear.
 
Hi Andrey, I am new to MT4 and would like to set up an email alert when the Heiken Ashi close (open+close+high+low/4) crosses the smoothed MA 5. I have started reading through the help files but still have a ways to go before I can do this myself. Can you help me ? thank you
 

Andrey,

thank for your indications, I really can't do it because I don't understand the codes, can you help me to get ADXcrosses with alerts signals????, can you help me in this way???

Really, thank a lot.

Best regards,

Ricardo

Ricardo Portugau

ricardo.portugau@gmail.com

 

how do using in EA?. for sParabolic Sub.mq4

Please a sample .

string result=iCustom(.....);

if result=="BUY" ...

if result =="sell"..

 
//+------------------------------------------------------------------+
//| DPC Market Range Alert.mq4 |
//| Copyright © 2010, MetaQuotes Software Corp. |
//| http://wwwDeltaPrimeCapital.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link "http://wwwDeltaPrimeCapital.com"


extern int ATR = 26;
extern int ATRtf = PERIOD_D1;
extern int Range = 100;

int PrevAlertTime = 0;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
int limit=Bars-counted_bars;
if(counted_bars>0) limit++;counted_bars--;
for(int i=0; i<limit; i++)
double ADR = iATR(NULL,ATRtf,ATR,i)/Point;
double DR = ( iHigh(NULL,ATRtf,0) - iLow(NULL,ATRtf,0) )/Point;
double DPR = (DR/ADR)*100;
double alertTag;
if ( (DPR*Point) > (Range*Point) )
{if ( alertTag!=Time[0])
{PlaySound("news.wav");// buy wav
Alert(Symbol()," M",Period()," ", Symbol(), " Reach ",Range, " %" );}alertTag = Time[0];}
//----
return(0);
}

//+------------------------------------------------------------------+

I have minor coding experience, this indicator always beep per tick, can you help me to fix it? thanks

 

hi ricardo can you do me a favour do you have an ADX with sound alert..is it done are you willing to share it with me ???

happy new year!!

 

help   plz     alert

 

 

 

#property copyright "?2007 RickD"
#property link      "http://www.e2e-fx.net/"

#define major   1
#define minor   0

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Yellow
#property indicator_width1  1
#property indicator_width2  1


extern int Fr.Period = 6;
extern int MaxBars = 500;


double upper_fr[];
double lower_fr[];

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

void init() {
  SetIndexBuffer(0, upper_fr);
  SetIndexBuffer(1, lower_fr);
 
  SetIndexEmptyValue(0, 0);
  SetIndexEmptyValue(1, 0);
 
  SetIndexStyle(0, DRAW_ARROW);
  SetIndexArrow(0, 234);

  SetIndexStyle(1, DRAW_ARROW);
  SetIndexArrow(1, 233); 
}

void start()
{
  int counted = IndicatorCounted();
  if (counted < 0) return (-1);
  if (counted > 0) counted--;
 
  int limit = MathMin(Bars-counted, MaxBars);
 
  //-----
 
  double dy = 0;
  for (int i=1; i <= 20; i++) {
    dy += 0.3*(High[i]-Low[i])/20;
  }
 
  for (i=0+Fr.Period; i <= limit+Fr.Period; i++)
  {
    upper_fr[i] = 0;
    lower_fr[i] = 0;
 
    if (is_upper_fr(i, Fr.Period)) upper_fr[i] = High[i]+dy;
    if (is_lower_fr(i, Fr.Period)) lower_fr[i] = Low[i]-dy;
  }
}

bool is_upper_fr(int bar, int period)
{
  for (int i=1; i<=period; i++)
  {
    if (bar+i >= Bars || bar-i < 0) return (false);

    if (High[bar] < High[bar+i]) return (false);
    if (High[bar] < High[bar-i]) return (false);
  }
 
  return (true);
}

bool is_lower_fr(int bar, int period)
{
  for (int i=1; i<=period; i++)
  {
    if (bar+i >= Bars || bar-i < 0) return (false);
   
    if (Low[bar] > Low[bar+i]) return (false);
    if (Low[bar] > Low[bar-i]) return (false);
  }
 
  return (true);
}
 

Reason: