My guess is that its missing some code because it does not want to start. After I drag it to the chart, choose options and click OK, nothing shows up. And the expert tab says it was removed.
If possible:
-
The volume I’m looking at is on the 5min but options for other TFs would be nice.
-
I need this on a bar by bar basis. So if Volume>x, send an email. If the next bar is also Volume>x, send another email. An email should be sent everytime Volume>x BUT no repeat emails for the same alert.
Thank you thank you thank you to anyone that can do this!
//+------------------------------------------------------------------+
//| VolumeSpike.mq4 |
//| Copyright © 2008, Antonuk Oleg |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Antonuk Oleg"
#property link "[email protected]"
#property indicator_chart_window
//---- input parameters
extern string emailSubject="Time to trade (VolumeSpike indicator)",
emailText="It is signal from VolumeSpike indicator";
extern int volumeValue=50;
int currentDay, lastDay;
bool emailSentToday;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
emailSentToday=false;
currentDay=DayOfYear();
lastDay=DayOfYear();
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
if(!emailSentToday)
{
if(Volume[0]>volumeValue)
SendMail(emailSubject,emailText);
emailSentToday=true;
}
else
{
currentDay=DayOfYear();
if(currentDay!=lastDay)
{
emailSentToday=false;
lastDay=currentDay;
}
}
return(0);
}
//+------------------------------------------------------------------+