Been having a debate as to whether to use AccountFreeMargin or AccountBalance to calculate position size when using a risk percentage.
What is correct ? Using AccFreeMargin means taking floating losses AND profits into account, AccountBalance, neither, so which is best ?
Also the following is the code im using - can anyone confirm its correct for calculating position size ?
thx
What is correct ? Using AccFreeMargin means taking floating losses AND profits into account, AccountBalance, neither, so which is best ?
Also the following is the code im using - can anyone confirm its correct for calculating position size ?
thx
Inserted Code
CalcLots = NormalizeDouble(MathFloor(AccountFreeMargin() * MaxRisk / 100.0 / (MarketInfo(symbol, MODE_MARGINREQUIRED) * LotStep)) * LotStep, 2);