Download MetaTrader 5

pause EA for X min if taking SL ?

To add comments, please log in or register
No time to learn MQL5? The source code library is at your service!
akinob
12
akinob 2013.06.09 20:12 

Hi, new in this just made my first EA on stoch and RSI  with a free EA builder, It seems to work fine on quiet market hours on 1min time frame just scalping small moves .

 

But if market start moving fast in one direction my EA will still enter the  market as my indicators will still be over or under bought so  I need to add a code to my EA for not taking several losses in a row.

anyone can help me to add a code in my EA with this idea :

 

if 1 loss taken pause  EA fox X min

if x loss taken  in x min pause  EA until manual activation + send mail alert 

 

to avoid big market move o betteer said being alerted and take manuel position :)

 

any site o reference to learn codebase will be apreciated

 

thks  

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2013.06.09 22:16  
akinob:

Hi, new in this just made my first EA on stoch and RSI  with a free EA builder, It seems to work fine on quiet market hours on 1min time frame just scalping small moves .

 

But if market start moving fast in one direction my EA will still enter the  market as my indicators will still be over or under bought so  I need to add a code to my EA for not taking several losses in a row.

anyone can help me to add a code in my EA with this idea :

 

if 1 loss taken pause  EA fox X min

if x loss taken  in x min pause  EA until manual activation + send mail alert 

Don't Sleep() . . .  record the time and then keep returning from start() until the current time > recorded time + delay
Documentation on MQL5: Date and Time / TimeCurrent
Documentation on MQL5: Date and Time / TimeCurrent
  • www.mql5.com
Date and Time / TimeCurrent - Documentation on MQL5
akinob
12
akinob 2013.06.10 19:40  
RaptorUK:
Don't Sleep() . . .  record the time and then keep returning from start() until the current time > recorded time + delay
great but Iam really a newbie and dont program nada so If I understand the principle I dont know how to write it ... could you help . thks a lot :)
Alain Verleyen
Moderator
30745
Alain Verleyen 2013.06.10 20:04  
akinob:
great but Iam really a newbie and dont program nada so If I understand the principle I dont know how to write it ... could you help . thks a lot :)
Show us what you have tried and you will receive help.
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2013.06.10 20:49  
akinob:
great but Iam really a newbie and dont program nada so If I understand the principle I dont know how to write it ... could you help . thks a lot :)
I'm a newbie at mql5 so just like me you will have to make the effort and learn . . .
To add comments, please log in or register