"So, I've been trying to figure out how much money a trade would need to stay open, even if the price hit zero"
Assuming you are long, you will need margin deposit to cover the unrealized loss, which could be, shall we say, substantial.
GBP, one lot long at 2.0000, and it goes to zero = -20000 pips = $200,000 loss.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good day,
So, I've been trying to figure out how much money a trade would need to stay open, even if the price hit zero. This is what I came up with:
Lot_Required_Margin = MarketInfo(Symbol(),MODE_MARGINREQUIRED);
Required_Margin = (Lot_Required_Margin*Lot_size);
AvailableBalance = AccountBalance();
while(OrderSelect(i, SELECT_BY_POS)==true){
if(OrderSelect(i, SELECT_BY_POS)==true){
AvailableBalance = (AvailableBalance - ((OrderOpenPrice()*1.10)+Required_Margin));
}
i++;
}
The idea is it would take the open price of the order, add 10% to it then add the margin required to open the trade. Once this is done, subtract that from the balance. The money left over will be divided with the same ((OrderOpenPrice()*1.10)+Required_Margin)), this will tell how many trades it can afford to open. Any help would be great.
Thanks