Download MetaTrader 5
To add comments, please log in or register
Do you want to know about the MQL5.community development? Have a look at the Wall!
MF
51
MF 2015.04.23 15:30 

How I can make my EA stop in target and continue in another time?

For example,if the EA earn 100 pips in this day,he will stop and start  agian in the next day.

Thanks 

Keith Watford
Moderator
7887
Keith Watford 2015.04.23 19:52  

An example of code to stop and re-commence trading the next day in this thread

https://forum.mql4.com/67412 

MF
51
MF 2015.04.23 20:47  
Thank you very much.you know how I can make a function or there is a function that calculat the total profit for this day?
Keith Watford
Moderator
7887
Keith Watford 2015.04.23 20:52  
MF10000:
Thank you very much.you know how I can make a function or there is a function that calculat the total profit for this day?

The code in the other thread shows you how to find the datetime value for midnight.

Loop through open orders and history and sum OrderProfit() for each trade with an OrderOpenTime>= midnight. 

MF
51
MF 2015.04.23 21:23  
Thank you!!
Opengates
165
Opengates 2015.04.28 19:54  

Hi MF10000,

Pls I am in need of the code you requested for help about. Can you pls post it here if you are able to make it work or you have a working codes? I was the one that opened this thread: https://forum.mql4.com/67412  but I am yet to get a working code to stop my ea from trading for the rest of the day after I have reached my daily target profit.

Thanks in advance as you help a fellow brother.

whroeder1
13596
whroeder1 2015.04.29 01:02  
Opengates: Pls I am in need of the code
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
/
To add comments, please log in or register