Sizing from equity or from balance in an EA, and the difference in a losing streak
my EA sizes positions as a percent of the account, but I had to decide which number to use: the balance or the equity. They differ when there are open trades, and the choice affects behaviour more than I expected.
Using the balance is stable. It only changes when trades close, so the size is predictable. The downside is that it ignores floating profit and loss, so if several trades are open and losing, the next one is still sized from the old balance.
Using the equity responds immediately to floating results. If I'm losing on open trades, the new trades are smaller, which is a kind of automatic brake. If I'm in floating profit, they get larger, which can be a problem if that profit then reverses.
I use the balance for the base risk and apply the equity as a cap. If the equity is lower than the balance by some amount, the size is reduced. If it's higher, I don't increase it. That gives me the stability of one and the safety of the other.
I tested the options in a long run, and the drawdown with the cap was smaller than with either alone.
Sizing from equity or from balance in an EA, and the difference in a losing streak
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
I went with balance for sizing as well, but I added a check on equity drawdown on top. If the floating loss on open trades goes beyond a set amount, the EA stops opening new positions until things settle. That gives me the predictability of balance sizing without ignoring the risk that is already sitting on the account. The combination felt more sensible than picking one number and living with its weak spot. On a prop account it also matters because the daily limit is usually measured on equity, not balance.
It’s Fairman 
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
Something that surprised me when I tested both was how equity sizing behaved during a run of open winners. The new trades got bigger right at the moment when the market was stretched, and then a reversal hit the bigger positions hardest. In a losing streak equity sizing helps, but in a winning streak it can add risk at the worst time. That was enough for me to stay with balance and treat floating profit as not real until the trade closes.
It’s Fairman 
-
Shadow Trader
- Posts: 5594
- Joined: Wed Sep 09, 2026 5:19 pm
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
For an EA that holds one trade at a time, balance and equity sizing give exactly the same lot on every entry, since nothing is floating when the next order goes in. The choice only matters when positions overlap.
Say a 10,000 dollar account risks 1 percent, and four trades are open with 80 dollars of floating loss each. Equity is 9,680, so the next trade risks 96.80 instead of 100, a difference of about 3 dollars, while the five trades together risk nearly 500 dollars if every stop is hit.
A cap on total open risk, such as 4 percent across all positions, does more than either sizing base. With the cap in place, the fifth trade is simply not opened until something closes.
On a prop account with a daily limit measured on equity, the numbers get tighter. If the limit is 5 percent of a 100,000 account and floating losses already sit at 3,000, the room left is 2,000, so two more full stops at 1 percent would reach the limit.
The equity check described above handles this if its threshold comes from the daily limit. Does the EA measure it from the day's starting equity or balance?
Say a 10,000 dollar account risks 1 percent, and four trades are open with 80 dollars of floating loss each. Equity is 9,680, so the next trade risks 96.80 instead of 100, a difference of about 3 dollars, while the five trades together risk nearly 500 dollars if every stop is hit.
A cap on total open risk, such as 4 percent across all positions, does more than either sizing base. With the cap in place, the fifth trade is simply not opened until something closes.
On a prop account with a daily limit measured on equity, the numbers get tighter. If the limit is 5 percent of a 100,000 account and floating losses already sit at 3,000, the room left is 2,000, so two more full stops at 1 percent would reach the limit.
The equity check described above handles this if its threshold comes from the daily limit. Does the EA measure it from the day's starting equity or balance?
-
Shadow Trader
- Posts: 5594
- Joined: Wed Sep 09, 2026 5:19 pm
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
One more case worth checking in the EA code is what the platform counts as equity. On MetaTrader the equity figure includes any credit or bonus the broker has added while the balance does not, so a 500 bonus on a 2,000 deposit makes equity based sizing 25 percent larger before a single trade is open.
Lot rounding can matter more than the choice of base on a small account. Say the account holds 2,000, risk is 1 percent and the stop is 10 pips on EURUSD, which gives 0.20 lots from the balance.
If equity sits at 1,960 because of an open loser, the raw figure is 0.196. Rounding to the nearest step gives 0.20, the same lot the balance would give, so the brake disappears and rounding down to 0.19 is the safer default.
Swap and commission sit inside equity too. A position held over several nights with negative swap drags equity below balance even when price has gone nowhere, so equity sizing slowly trims the next lot on those pairs.
Does the EA read balance and equity at the moment the order is sent or when the signal bar closes? With several trades open, a few seconds of movement can shift equity enough to cross a rounding step.
Lot rounding can matter more than the choice of base on a small account. Say the account holds 2,000, risk is 1 percent and the stop is 10 pips on EURUSD, which gives 0.20 lots from the balance.
If equity sits at 1,960 because of an open loser, the raw figure is 0.196. Rounding to the nearest step gives 0.20, the same lot the balance would give, so the brake disappears and rounding down to 0.19 is the safer default.
Swap and commission sit inside equity too. A position held over several nights with negative swap drags equity below balance even when price has gone nowhere, so equity sizing slowly trims the next lot on those pairs.
Does the EA read balance and equity at the moment the order is sent or when the signal bar closes? With several trades open, a few seconds of movement can shift equity enough to cross a rounding step.
-
FXS Prop Desk
- Posts: 1689
- Joined: Wed Oct 07, 2026 9:52 am
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
The difference becomes very clear in a losing streak. Sizing from equity reduces size slightly while trades are open and losing, which adds a small protective effect. Sizing from balance keeps it fixed until the trade closes.
For prop accounts with equity-based limits, sizing from equity often makes more sense because it matches how the firm measures risk. For personal accounts, either works as long as the choice is consistent. The worst option is switching between the two depending on the situation.
For prop accounts with equity-based limits, sizing from equity often makes more sense because it matches how the firm measures risk. For personal accounts, either works as long as the choice is consistent. The worst option is switching between the two depending on the situation.
FXS Official Team | The Idea Lab & Strategy
-
Shadow Trader
- Posts: 5594
- Joined: Wed Sep 09, 2026 5:19 pm
Re: Sizing from equity or from balance in an EA, and the difference in a losing streak
Seven losses in a row on a 55% system, and the trader decides the thing broke. Fair?
The tempting maths says no way. Seven losses at 45% each is 0.45 to the power 7, about 0.37%. Tiny. But that is the chance of seven losses starting at one specific trade. In 200 trades there are nearly 200 places a run could start, so the chances add up fast.
Working it through with the standard run-length recursion for independent trades, the rough odds of at least one losing run of a given length somewhere in 200 trades come out like this:
- 5 or more: about 88%
- 6 or more: about 60%
- 7 or more: about 33%
- 8 or more: about 16%
- 10 or more: about 3.5%
So a typical longest streak sits around 6, a 7 is roughly a one in three event, and a 10 is rare but not impossible. A streak of 7 does not prove a broken edge.
Do not trust the maths, test it. Fill 200 rows of a spreadsheet with =IF(RAND()<0.55,1,0), find the longest run of zeros, recalculate a few dozen times and note the spread of results. Then do the same with the real trade log. If the real longest losing run sits way outside what the simulation gives, something in the system or the sample deserves a look.
Money matters too. If each loss risks 1%, seven in a row is about 6.8% off the account (0.99 to the power 7 is about 0.932). At 5% risk each, the same streak costs about 30%.
What is the longest losing streak you have logged, and how many trades was it out of?
The tempting maths says no way. Seven losses at 45% each is 0.45 to the power 7, about 0.37%. Tiny. But that is the chance of seven losses starting at one specific trade. In 200 trades there are nearly 200 places a run could start, so the chances add up fast.
Working it through with the standard run-length recursion for independent trades, the rough odds of at least one losing run of a given length somewhere in 200 trades come out like this:
- 5 or more: about 88%
- 6 or more: about 60%
- 7 or more: about 33%
- 8 or more: about 16%
- 10 or more: about 3.5%
So a typical longest streak sits around 6, a 7 is roughly a one in three event, and a 10 is rare but not impossible. A streak of 7 does not prove a broken edge.
Do not trust the maths, test it. Fill 200 rows of a spreadsheet with =IF(RAND()<0.55,1,0), find the longest run of zeros, recalculate a few dozen times and note the spread of results. Then do the same with the real trade log. If the real longest losing run sits way outside what the simulation gives, something in the system or the sample deserves a look.
Money matters too. If each loss risks 1%, seven in a row is about 6.8% off the account (0.99 to the power 7 is about 0.932). At 5% risk each, the same streak costs about 30%.
What is the longest losing streak you have logged, and how many trades was it out of?