Tricky Question? Can one Code the AccountBalance() for Today and AccountBalance for Yesterday?

 
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.
 
wasabiman:
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?

 
asiko79:
wasabiman:
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:
asiko79:
wasabiman:
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.
 
edddim:
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!

Reason: