As you know, traders need to control their positions risk.
One of the basic way to do so is not to spend all the equity that remains in our account in case of the losses our positions could face after opening them. Of course that implies to check the equity before opening any new position.
JForex is a real time trading
environment,
then our strategies which, in real time too, analyse the market and then take or not the decision to create a new position
need to know the value of Equity in real time.
It is said in the documentation that :
Quote:
double getEquity() Returns current equity. Value returned by this function is for information purposes and can be incorrect right after order changes, as it is updated about every 5 seconds
That's totally in contradiction with the basic need of a trader to control his positions risk.
If I insist on that, that's because I faced the same problem while testing my strategies with the previous API (which also didn't provide a real time updated Equity). Even if one of my conditions for launching a new trade was my positions not to overtake 40 % of the remaining equity, my positions were often using 100 % (and more if some losses occured...) of my equity. And that ,even if I invested only 5 % of my initial equity on each trade.
Of course,
getEquity() should also take into account the commissions paid during our investments. (As it was not doing that in the previous API), because, as you know, the amount of the commssions could represent a big ratio of profits and losses.
I noticed that I could never overtake 100 % of my equity just after opening a new position.
That means that you have the real-time-updated variable to prevent any trader to overtake this 100 % level.
What we need from you is only to provide us this real time variable.
That's a crucial problem.
Thank you