Sizing each trade from the stop: risk per trade and daily loss limits
Most blown accounts did not have a bad entry rule; they traded too big. Size is the one thing a robot can always get right.
The formula
Decide how much of the balance one trade may lose, then work back to the lot size from the distance to the stop:
lots = (balance × risk %) ÷ (stop in pips × value of one pip for one lot)
Example: a 10,000 USD account, 0.5% risk, so 50 USD. On EURUSD the stop is 25 pips and one pip on one standard lot is worth 10 USD. 50 ÷ (25 × 10) = 0.2 lots. If the stop is hit, the loss is about 50 USD plus the spread.
The lot size changes with the stop. A wider stop means a smaller trade, never a bigger loss.
When the minimum lot is too big
On small accounts the broker's minimum lot (often 0.01) can risk more than you want. FxBotLab skips the trade if the minimum lot would risk more than 2% of the balance, and writes the reason on the panel. That is why it makes no trades on accounts of about 100 USD or less.
A daily loss limit that counts open trades
A limit that only counts closed losses can be overrun: five trades open at once can all hit their stops in the same hour. FxBotLab adds the risk of every open trade to the day's closed result before it opens another one. If the new trade could push the day past the limit, it is skipped.
The FxBotLab settings
RiskPercent: risk per trade, 0.5% by default, never more than 2%.DailyLossPercent: 2% by default, never more than 6%.MaxSpreadShare: the trade is skipped if the spread is more than 20% of the stop distance.- Every order is sent with its stop. There is no order without one.
The caps are written into the robot, so a typo in the settings cannot turn 0.5% into 50%.