Need help adding email alert to indicator

 

Can anyone help me to add an email alert to an indicator? It has a sound alert which works beautifully but when I try to add SendMail it gives me errors. I have no programming skills so I have not been able to correct the errors. Thank you for any help you can provide.

Regards,

Mike

//+------------------------------------------------------------------+
//| Fine Fractals.mq4 |
//| Copyright © 2009 Äåíèñ Îðëîâ |
//| http://denis-or-love.narod.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009 Äåíèñ Îðëîâ"
#property link "http://denis-or-love.narod.ru"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];

extern bool Fine=True;
extern bool FlatShift=True;
extern bool NewFAlert=False;

//+------------------------------------------------------------------+
//| iCustom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW);
SetIndexArrow(0,164);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexEmptyValue(0, 0.0);
SetIndexStyle(1, DRAW_ARROW);
SetIndexArrow(1, 164);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexEmptyValue(1, 0.0);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("Fine Fractals");
SetIndexLabel(0, "iFractalsUp");
SetIndexLabel(1, "iFractalsDn");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars = IndicatorCounted();
//----
int limit;
//---- ïîñëåäíèé ïîñ÷èòàííûé áàð áóäåò ïåðåñ÷èòàí
if(counted_bars > 0)
counted_bars--;
limit = Bars - counted_bars;
//---- îñíîâíîé öèêë
for(int i = 2; i < limit; i++)
{
double
HP1=High[i+1],HP2=High[i],HP3=High[i-1],HPi=High[i-2],
LP1=Low[i+1],LP2=Low[i],LP3=Low[i-1], LPi=Low[i-2],

res=iFractals(NULL, 0, MODE_UPPER, i);
if(res==0 && Fine)//ïîâûøåííàÿ ÷óâñòâèòåëüíîñòü
{
if(HP1<HP2&&HP2>HP3 && (LP2>=LP3 || HP2>HPi)) res=HP2;
}
if(FlatShift && res!=0)// ñäâèãàåò ôðàêòàë ôëåòà
while(iHigh(NULL,0,i)==iHigh(NULL,0,i+1)) i++;
ExtMapBuffer1[i] = res;
if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé âåðõíèé ôðàêòàë "+DoubleToStr(res,Digits));

res= iFractals(NULL, 0, MODE_LOWER, i);
if(res==0 && Fine)
{
if(LP1>LP2&&LP2<LP3&& (HP2<=HP3 || LP2<LPi)) res=LP2;
}
if(FlatShift && res!=0)
while(iLow(NULL,0,i)==iLow(NULL,0,i+1)) i++;
ExtMapBuffer2[i] =res;
if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé íèæíèé ôðàêòàë "+DoubleToStr(res,Digits));
}
//----
return(0);
}
//+------------------------------------------------------------------+
 
Maybe you can Pay someone. Then you can share the codes with everyone.
 
a1arunner:

Can anyone help me to add an email alert to an indicator? It has a sound alert which works beautifully but when I try to add SendMail it gives me errors. I have no programming skills so I have not been able to correct the errors. Thank you for any help you can provide.

Please use this to post code . . . it makes it easier to read.

What errors ? Please show your modified code . . . . (Please use the SRC button and paste your code into the box . . .)

 

Доброго времени суток уважаемые форумчане!

Меня зовут Герман, мне 23 года, я являюсь трейдером компании "Инстафорекс"

Помогите в поиске нужного скрипта! Скрипт нужен для сетки отложенных ордеров.

 
GERICH:

Доброго времени суток уважаемые форумчане!

Меня зовут Герман, мне 23 года, я являюсь трейдером компании "Инстафорекс"

Помогите в поиске нужного скрипта! Скрипт нужен для сетки отложенных ордеров.

Can you please stop SPAMMING every post in sight . . . please delete your posts so I can see what is new and not just your SPAM ! !
Reason: