Account Balance Alarm

 

Hi All

Does anyone have an indicator or ea that will make a sound once the account balance reaches a user defined number

for example, if the user says 10,000 then an alarm would sound once the account balance reaches this point

I have looked for one but cant see on anywhere..

Any help would be appreaciated

Michael

 
baseage:

Hi All

Does anyone have an indicator or ea that will make a sound once the account balance reaches a user defined number

for example, if the user says 10,000 then an alarm would sound once the account balance reaches this point

I have looked for one but cant see on anywhere..

Any help would be appreaciated

Michael

extern double alarm_balance=10000;

bool alarm_was;

 

int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],
                const double &low[],const double &close[],const long &tick_volume[],const long &volume[],const int &spread[])

{

if(!alarm_was && AccountBalance()>=alarm_balance)

{

 alarm_was=true;

Alert("Balance reached!"); 

} 

 

return(rates_total); 

} 
 

thanks Vasyl Nosal


Can you create this for me as i dont know what to do with the code


Michael


 
baseage:

thanks Vasyl Nosal


Can you create this for me as i dont know what to do with the code


Michael


create file mq4 and copy all code there.

 

have no idear how to do that as it is giving me all sorts of options and not sure where to stick the code

if you can do it for me, that would be fantastic

Reason: