It looks like behavior of IHistory.getEquity() in LIVE mode is incorrect and may have experienced a regression bug.
Prior platform version 2.18.13 appears to have been correct.
As you know, onAccount updates are fairly infrequent. So in order to get a better estimate of equity, I read in the forum that IHistory's method getEquity() could be used. I've been using this method for a while now...
In the onTick event, if I have not received an onAccount update for a while...
then I use IHistory's getEquity() to update the equity. But it is retrieving a value which does not match the true equity, it is a lower value. (see attached image)
This value does not agree with the correct Equity value as shown on lower left of JForex platform. The account position is FLAT at this time.
I have attached an image of the mismatch in values. The incorrect value originates from IHistory getEquity() from within a Strategy module onTick callback context. The code was functioning correctly for v2.18.13 of the JForex platform. I think I'm using this correctly, it has worked for at least a week until the regression appeared.
IHistory history = context.getHistory();
double accountEquity = history.getEquity(); // appears incorrect