View Single Post
  #6 (permalink)  
Old 01-03-2008, 08:39 AM
Jin's Avatar
Jin Jin is offline
Junior Member
 
Join Date: Apr 2007
Posts: 15
Jin is on a distinguished road
Question Parabolic SAR - Changing Alert from Popup to Email?

Hi,

I have a useful Parabolic SAR indicator with popup alert, but I need an email alert for it.

I tried to change the alert from popup to email, but I can't get it to compile without errors... I think the solution is probably obvious but I can't figure it out, if somebody could please fix it...

Here is the original alert code that is working :
Quote:
if(AlertsEnabled==true && sarUp[i] == 0 && Bars>alertBar)
{
Alert("Parabolic SAR Going Down on ",Symbol(),"-",Period());
alertBar = Bars;
}
And here's my change which causes the problem :
Quote:
if(AlertsEnabled==true && sarUp[i] == 0 && Bars>alertBar)
{
SendMail("Parabolic SAR Reverse");
alertBar = Bars;
}
I'm getting the following compile error :
Quote:
')' - wrong parameters count C:\Program Files\MetaTrader\experts\indicators\Parabolic SAR Color - Email.mq4 (74, 40)
I'm also getting another compilation error ('else' - unexpected token) which I guess is related to whatever is causing the first error.

I've attached the original indicator file.

Thanks,
Jin
Attached Files
File Type: mq4 Parabolic SAR Color - Alert.mq4 (2.9 KB, 153 views)
Reply With Quote