Hello,
I'm looking for formula to calculate the current leverage in use. I think this is really simple question, I just can't figure out if I'm correct or not
I know that maximum leverage is AccountBalance()*AccountLeverage()
Therefore I would assume that if my current used margin is AccountBalance()-AccountFreeMargin()
The leverage would be
(AccountBalance()-AccountFreeMargin())/AccountBalance()*AccountLeverage()
Is the above correct?
Also what is difference between AccountMargin() and AccountBalance()-AccountFreeMargin()? I'm a bit confused about the functions around this.
thanks in advance!
I'm looking for formula to calculate the current leverage in use. I think this is really simple question, I just can't figure out if I'm correct or not
I know that maximum leverage is AccountBalance()*AccountLeverage()
Therefore I would assume that if my current used margin is AccountBalance()-AccountFreeMargin()
The leverage would be
(AccountBalance()-AccountFreeMargin())/AccountBalance()*AccountLeverage()
Is the above correct?
Also what is difference between AccountMargin() and AccountBalance()-AccountFreeMargin()? I'm a bit confused about the functions around this.
thanks in advance!