Skip to content

Maximum loss

The Maximum loss module prevents opening new orders once the loss within a period (for example a day) reaches a limit. The loss includes the profit or loss of the orders that are still open. Use it as a daily or weekly loss limit.

00:00 16:00 00:00 Result today ($) No new orders $0 −$16 Maximum loss 1 SL hit: −$8 2 Maximum loss reached No new orders 3 New D1 period back to $0
Maximum loss
  1. The module adds up the loss of the current period: closed orders plus the open orders.
  2. When it reaches Maximum loss, no new orders open for the rest of the period. Open orders keep running.
  3. When a new period starts, the count starts at 0 again and the EA can open orders again.
  • Name: optional, tells this module apart from others of the same kind. See Name.
  • Maximum loss: the loss at which new orders are blocked.
  • Unit: Pips, Money or Percentage of balance. See Unit.
  • Per (timeframe): the period in which the loss adds up: Current timeframe (the chart’s), M1, M5, M15, M30, H1, H4, Daily, Weekly or Monthly. With Daily, all losses of the current day add up to your total loss.

The window starts at the beginning of the selected period and resets when a new period begins:

  • Daily resets at the start of each day (midnight, broker server time).
  • Weekly resets at the start of each week.
  • Monthly resets at the start of each month.

When the window resets, the loss is cleared and the EA can open new orders again, as long as your other strategy modules also allow it.

Your Maximum loss is $16 per Daily. Your EA hits its second stop loss at 16:00, and the day’s total loss passes $16. New orders are blocked for the rest of that day.

The block is not lifted 24 hours later (16:00 the next day), but at the reset of the day window at midnight (00:00): the next day starts a fresh $0 count.

We could have built a module that closes all orders when the maximum loss is reached, but we chose to only prevent opening new orders. An order should be allowed to run its normal course instead of being cut off prematurely. A maximum loss shouldn’t be an afterthought, but a well thought out part of your EA.

So if you want at most 5% of loss a day, make sure the maximum loss of this module plus the stop loss of your Stop loss module never pass 5%. With a stop loss of 1% of the balance, you would be wise to set this module to 3.5%.

MetaTrader is a registered trademark of MetaQuotes Ltd. EA Builder Pro is not affiliated with MetaQuotes.