- Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes
- Comparing yesterday and today in an EA
- How to code?
Is there some EA code that can determine the AccountBalance() for Today and theAccountBalance() for Yesterday? I'll appreciate it very much if someone can assist me to "code" the above if possible.
Why NOT if NOT father xmas gifts?
Is there some EA code that can determine the AccountBalance() for Today and theAccountBalance() for Yesterday? I'll appreciate it very much if someone can assist me to "code" the above if possible.
Why NOT if NOT father xmas gifts?
Rather reserve you inappropiate comments for Christmas. If you cannot add value to assist, conveniently go play somewhere else.
Is there some EA code that can determine the AccountBalance() for Today and theAccountBalance() for Yesterday? I'll appreciate it very much if someone can assist me to "code" the above if possible.
Why NOT if NOT father xmas gifts?
Rather reserve you inappropiate comments for Christmas. If you cannot add value to assist, conveniently go play somewhere else.
Wasabiman,
Why Not Establish a loop within yr EA, and while OrderHistoryTotal is equal to the loop limit and categorise your history orders involved in addition using
OrderOpenTime vs OrderCloseTime... Just take a snap shot below:
for(vp=0;vp<OrdersHistoryTotal();vp++)
{
if(OrderSelect(vp,SELECT_BY_POS,MODE_HISTORY) && Symbol()==OrderSymbol())
{
if(TimeToStr(OrderOpenTime(),TIME_DATE)==TimeToStr(TimeCurrent(),TIME_DATE) && OrderProfit()<0) cF=cF+1;
}
}
You have current/Today's balance with AccountBalance(), remove closed trades profit/loss from History from current date you will get yesterday's balance.
Thank you ever so much, its amazing what can be achieved with a little guidence! You guys are great. Tried it and it worked fine!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use