You are not ready to trade live
You could, but you would surely keep losing money.
You barely have an understanding of leverage, margin, position sizing and overall risk management.
I suggest you get back to school.
I once told a friend that “opening a demo account and trying out things for a few months does not mean you have learnt to trade the FX market.” You still need to study and read up lots of stuff.
Answering your Question
That happens when you no longer have enough margin to support your open position, it called “margin call”.
Leverage also determines how much your broker holds back as margin for each open position.
$1 a pip is a mini lot. You want to trade a mini lot with a $40 account? Really!!!
You will get margin called after just few negative pips.
If your leverage is 1:50. To open a mini lot you’ll need about $200 as margin, greater than your account.
If your leverage is 1:100. You’ll need about a $100 as margin, which is greater than your account.
If your leverage is 1:200. You’ll need about $50 as margin, which is greater than your account.
You can only open that with a leverage greater than 1:200
Get back to school…