Struggling with some math here and could use some help. Here’s what I’m trying to figure out.
I want to convert a percent of account balance to “units” for a trade. The MetaTrader 4 trading platform asks for “units” on a buy or sell. But I want to think in terms of % of my account balance, so I’m trying to come up with the formula to convert between the percentage and “units”.
For example (a hypothetical situation), I have a $1,000 balance in my account. I want to risk 2% of my account balance ($20) on a trade (long on GPB/USD at 2.0669 just as an example). My leverage is 100:1 (1%). I’m trading standard lots (100,000).
What is the formula for computing “units” for this trade (as required by MetaTrader 4 to execute my transaction) based on the figures provided? Do I have all of the figures I need to complete the formula?
Once I have a working formula for this, I can plug it into a spreadsheet and use it to calculate the “units” for a given trade based on my account balance and what % of that balance I want to risk on any given trade.
If anyone else might find this helpful, here it is:
Account Balance in $
-divided by-
Leverage of your account as a percent (ex. - 100:1 is 1% leverage; 50:1 is 2% leverage; 10:1 is 10% leverage; 1:1 is 100% leverage)
-divided by-
Base Currency (Bid Price for Sell transaction, Ask Price for Buy transaction)
-divided by-
Lot Size (100,000 for standard; 10,000 for mini; 1,000 for micro; 100 for nano; 1 for Oanda.com)
-times-
Amount of Account Balance to risk as a percent
Result is # of units for the trade you wish to execute.
You can’t trade standard lots with a $1,000 account, anyway, because the cost to enter the trade will be more than your account balance when you take into consideration the maintenance margin requirement.
Now, do the same calculation for a mini lot @ $1/pip and a micro lot @ $0.10/pip and you get better numbers.
Thank you both for your input. Both are very helpful. I didn’t realize the risk figures in the stop loss. I’m retooling my spreadsheet to account for this.
Another quick question (well, a quick set of questions :)).
You say to use:
r= pips you are risking in .0001 per pip format
Where are you getting the .0001?
Does that assume a mini-lot size of 10,000?
If your account was using standard lot sizes, would the factor then be .00001?
Or is it truly a static factor regardless of lot size?
Thanks. I think I’m getting closer to my ideal formula.
When you divide by x, x = the lot size, not the number of lots. The reason this variable was included is because some people trade mini-lots or micro-lots. In my case I am currently trading mini lots therefore I would divide by 10,000 which is the lot size for a minilot.
I created this formula with GBPUSD in mind so for the GBPUSD one pip = .0001 so when I am talking about pips risked I would for example say 40 pips = .004
I’d be happy to answer anymore questions you may have; however, I am a newbie to the forex, but the math should work.
I use an position size calculator in MT4. You can download it for free and it tells you exactly how big your position can be as a % of your account or from your equity Also calculates R:R