Without knowing the details of your broker, your demo platform, and the trade you entered, I can’t give a precise answer to your question. But, a generic answer might suffice. Here’s my generic answer:
The units available figure is directly related to (1) the required initial margin, and (2) the unused margin in your account. Note that unused margin is sometimes called free margin, or available margin.
We’re going to be talking about initial margin, maintenance margin, used margin, and unused margin – so, we have to be careful about terminology.
Initial margin and maintenance margin are associated with each position that you take. Used margin and unused margin, on the other hand, are associated with the funds available in your account, whether you have an open position or not.
Let’s walk through the trade you entered, and decode the terminology as we go.
In your post, you didn’t provide any numbers, so I’ll just assume some numbers. Let’s say your demo account began with a balance of $50,000 in play-money. Let’s say that your account provides maximum allowable leverage of 50:1 (which corresponds to required initial margin of 2%). And let’s say that, prior to opening your position, your demo platform showed 2,500,000 units available.
You decided to place the largest possible trade – 2,500,000 units – presumably to see what would happen.
Let’s say that you entered a position in USD/JPY, or some other pair having the USD as the base currency. (Assuming that the base currency is the same as your account currency means that each unit of currency represents $1 of notional value. Making any other assumption would complicate some of the math.)
Your trade can be described in these ways: 2,500,000 units, $2,500,000 notional value, or 25 standard lots.
In order to open your $2,500,000 position, your account required you to have 2% of this amount available for initial margin – that is, margin required to initiate your position. In other words, you had to have $50,000 of unused margin available prior to entering this trade. You had that amount, so your position was successfully entered.
In the following description, I am ignoring profit or loss (including the loss created by the spread) in this position.
As soon as your position was entered, that initial margin requirement was replaced by your broker’s maintenance margin requirement. This required maintenance margin is the margin needed to maintain, or stay in, your position, and it is typically 50% of the required initial margin.
In other words, the initial $50,000 margin requirement was replaced by a $25,000 maintenance margin requirement, freeing up $25,000 of your original balance. That freed-up $25,000 is now called unused margin, and it is available for entering additional trades.
If you, once again, use every bit of the leverage available in your demo account, you can now add another position up to the limit of your $25,000 unused margin. That limit would be a position with a notional value of $1,250,000 – in other words, 1,250,000 units of base currency.
So, after your first trade was entered, your platform showed 1,250,000 units still available –
and that figure is one-half of the previous figure, as you have observed.
I hope that clears things up for you.