Daily Starting Account.Balance
Created at 22 Jun 2020, 19:57
Daily Starting Account.Balance
22 Jun 2020, 19:57
Hello, I need get the Account.Balance from the beginning of the day, the following code does not work, can someone help me?
It's important if the robot is disconnected after making trades, when connecting it will not be able to count the trades performed, hence the need to access the history.
HistoryDailyStartingBalance = History.Where(x => x.ClosingTime.Date.Day == Server.Time.Date.Day).OrderByDescending(x => x.EntryTime).Last().Balance;
Thank you
Replies
DelFonseca
23 Jun 2020, 01:58
RE:
Jiri said:
Hi, try this:
History.Any() ? History.Last(x => x.ClosingTime.Date < Time.Date).Balance : Account.Balance
Thank you very much for your help. Work perfectly!
Best regards
@DelFonseca
whis.gg
23 Jun 2020, 00:33
Hi, try this:
@whis.gg