Finding Max and Min of account balance in all history
28 Mar 2017, 13:26
Hi,
I need a bit help with finding Max and Min Balance of account in all history (since opening account). I have robots which are on and off, and not trading all time, but in them I would like to have Max and Min Balance accesed, to use it for some calculations.
Many thanks

whis.gg
28 Mar 2017, 16:10
Hi, try this.
double maximumBalance = double.MinValue; double minimumBalance = double.MaxValue; foreach (var historicalTrade in History) { maximumBalance = Math.Max(historicalTrade.Balance, maximumBalance); minimumBalance = Math.Min(historicalTrade.Balance, minimumBalance); }@whis.gg