The margin for locked positions is calculated as follows.
We have three positions with two of them are Sell and one is Buy (all these three Buy and Sell positions are locked).
To calculate the margin, you need to know the currency pair, account balance, and the buy price or sell price.
Sell 1.2670 0.1 lot (the sell price is 1.2670)
Buy 1.2895 0.1 lot (the buy price is 1.2895)
Sell 1.2915 0.1 lot
The formula for calculation: (10,000*currency pair*transaction size)/100*0.25 (or we divide by 4)
1. (10,000*1.2670*0.1)/100 = 12.67
_____________________________locked positions
2. (10,000*1.2895*0.1)/100 = 12.90/
3. 12.67 + 12.90 = 25.57
4. 25.57*0.25 = 6.39 (or 25.57/4 = 6.39)
5. (10,000*1.2915*0.1)/100 = 12.91 (the leverage is 1:100)
6. We deduct the results from the current balance and calculate the margin:
37.79 - 12.91 - 6.39 = $18.49 (the margin for the current account balance is $37.79)