How to get account balance
5 years ago #114190
im trying to get account balance in moment of computing order in public void computeForOrder(SQStats stats, StatsTypeCombination combination, SQOrder order, SQSettings settings, SQStats statsLong, SQStats statsShort)
There is a field
order.AccountBalance where im recieving 0.0 value
There is another method
order.getBalance(java.lang.String plType) where i dont know what is string plType
Yes there are another ways how to compute this value but can you please explain how to use theese approaches?
Thanks in advance
5 years ago #132621
balance is not calculated in statvalues but you can calcute it right in your snippet.
5 years ago #132623
this is I was looking for. 😉 So in generaly class statvalues do you not recommend for calculating this type of statisticcs right?
5 years ago #132624
StatValues is a right place to compute any type of stats.
If you need the balance just compute and use it.
In SQOrder atributes AccountBalance/PipsAccountBalance/PctAccountBalance are used in Equity control module which change them all the time according to the trade size.
5 years ago #132627
Excellent Tamas. Thank You.
Viewing 5 posts - 1 through 5 (of 5 total)