Likely your broker liquidated the position due to insufficient margin available in your online account.
With larger traders and especially before the days of online a broker would ring (US speak ‘call’) his client and tell him ‘your open position is going against you so much so that we need some more funds to cover possible losses’
That is known as a ‘margin call’ - if the client didn’t make more funds available then the broker would close out.
Online is the same thing - the greater the account balance then the more ‘margin’ funds that are available to cover losses.
No problem - one other thing going forward - how to minimize margin calls.
Three ways - first one is easiest for big pockets - lodge a sizable balance with the broker and trade smaller.
But as a retail learner we have an advantage - we don’t need a large account to learn, so second way is stick to less volatile instruments - test those on a demo to get a sense of margin - sure much more boring with small wins but that’s the key to success - KISS
Third way is the broker - less scrupulous will widen the spread at less liquid times (say maybe a holiday or perhaps weekend/nighttime etc) - when they widen the spread then a small profit or breakeven position will hit margin call territory and you’re out.
(Btw you will encounter KISS as ‘keep it simple’ - for us learners it’s ‘keep it small’
I know that there are many new traders who think that forex trading is an easy way of making money. But they are the ones who often end up losing in the market. I agree that there can be ups and downs, but you can’t achieve your goals if you are not putting your efforts in the right direction.