-
At the start of the day, remember the balance. Compare balance now vs. then. What's the problem?
-
New date, same as new bar test, but using date.
static datetime currentDay=0; datetime previousDay = currentDay; currentDay = date(); bool isNewDay = currentDay != previousDay;
Find bar of the same time one day ago - Simple Trading Strategies - MQL4 programming forum -
You could also use D1 timeframe, but then you have to deal with 4066/synchronization issue.
-
-
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
No free help 2017.04.21Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum 2018.05.12
Pinit Toonyanukoon :
What commands do I need to add?
For example, I want to close the EA that day when the profit is 10USD.
Code: Daily Target
The adviser checks the current profit on the trading account: if the profit has reached the target valueTarget profit (set in money) - all positions are closed and the adviser does not work anymore on that day.
Daily Target
- www.mql5.com
Советник проверяет текущую прибыль на торговом счёте: если прибыль достигла заданного значения Target profit (задаётся в деньгах) - все позиции закрываются и больше в этот день советник не работает.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What commands do I need to add?
For example, I want to close the EA that day when the profit is 10USD.