How to get account balance
4 replies
clonex / Ivan Hudec
11 years ago #114190
Hi ,
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
Clonex
0
Tamas
11 years ago #132621
Hello Clonex,
balance is not calculated in statvalues but you can calcute it right in your snippet.
0
clonex / Ivan Hudec
11 years ago #132623
Hi Tamas,
this is I was looking for. 😉 So in generaly class statvalues do you not recommend for calculating this type of statisticcs right?
Clonex
0
Tamas
11 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.
Best regards,
Tomas
0
clonex / Ivan Hudec
11 years ago #132627
Excellent Tamas. Thank You.
0
Viewing 4 replies - 1 through 4 (of 4 total)