Most traders I know decide their lot size before they decide where to place their stop loss.
It sounds backwards when you say it out loud, but it happens constantly. You look at the chart, you feel confident, you type 0.10 into the volume field, and then you find somewhere to put the stop. The position size came first. The risk came second.
I did this for years without noticing.
The problem with fixed lot sizes
A fixed lot size means your risk changes with every trade.
Say you trade 0.10 lots on XAUUSD. If your stop is 30 points away, you risk one amount. If your stop is 200 points away because the structure demands it, you risk almost seven times more. Same lot size. Completely different exposure.
Most of us know this. We still do it, because calculating the correct lot size for every setup is tedious, and tedious things get skipped when the market is moving.
Reversing the order
The fix is simple in theory. Decide your stop loss first. Decide what percentage of your account you are willing to lose. Then calculate the lot size that makes those two things true.
Risk amount = Account balance × Risk percentage Lot size = Risk amount ÷ Loss per lot at your stop distance
The formula is not complicated. The problem is doing it fast enough to matter.
If you are scalping gold on a one minute chart, you do not have ninety seconds to open a calculator, type in numbers, and switch back to your chart. The setup is gone.
What I built
I wrote a panel that does this calculation from a line on the chart.
You drag a horizontal line to where your stop belongs. The panel reads that price, compares it to the current bid or ask, and calculates the lot size for your chosen risk percentage. It also shows the exact money you would lose if that stop is hit.
Then you click BUY or SELL. The order goes out with the stop already attached.
The whole interaction is: drag the line, click the button.
Why the calculation method matters
There is a detail here that took me some time to get right.
Many lot calculators use point value approximations. They work fine on EURUSD with a USD account, and they drift on cross pairs, on metals, and on accounts denominated in currencies other than USD.
MQL5 has a function called OrderCalcProfit() that asks the broker directly: if I open this position at this price and close it at that price, what is my profit or loss in account currency?
That is the correct question. It handles contract sizes, tick values, and currency conversion automatically, because the broker already knows all of it.
Using this function means the calculation is correct on XAUUSD with a JPY account, on US30 with a EUR account, and on anything else your broker offers, without any configuration.
What this does not solve
Position sizing is arithmetic. It does not tell you whether the trade is good.
You still have to decide where the stop belongs, and that is the part that requires judgment. A tool that calculates lot size from a badly placed stop will give you a mathematically correct position in a bad trade.
What it does solve is the gap between knowing your risk rules and actually following them. When the correct number appears without effort, you stop overriding it.
If you want to see the panel I described, it is on my profile.


