What is locked positions?
Locked positions are positions of equal size on the same account on the same instrument but in opposite directions (buying and selling).
For example, a trader opens a trade to sell EURUSD of one lot. After a while, the price starts to go against the expectations of the trader and the trader decides to open an opposite position, buying the same amount of the trading instrument. As a result, his losses in the first position are fixed. Locked Position completely will not occupy the margin but will still incur a swap fee.
For details, you can refer to the swap long and swap short fee in the product specification of MT4/MT5.