Download MetaTrader 5
To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
baseage
15
baseage 2016.02.18 18:54 

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

Vasyl Nosal
18338
Vasyl Nosal 2016.02.18 23:32  
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); 

} 
baseage
15
baseage 2016.02.19 09:08  

thanks Vasyl Nosal


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


Michael


Vasyl Nosal
18338
Vasyl Nosal 2016.02.19 09:19  
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.

baseage
15
baseage 2016.02.19 10:34  

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

/
To add comments, please log in or register