Skip to content

Maximum profit

The Maximum Profit – Prevent open module, will prevent opening new trades when an amount of profit has been reached, withing a window of time (timeframe), including the profit/loss of the currently opened orders.

  • Maximum profit: the maximum amount of profit in pips, money or percentage of your equity.
  • Unit: Select pips, money or percentage of your equity.
  • Timeframe: Select the timeframe in which the profit has been reached. For example if you select D1, then all profits in the current day will add up to your total amount of profit.
    • Current = profit within timeframe of the chart.
    • M1 = profit within 1 minute.
    • M5 = profit within 5 minutes.
    • M15 = profit within 15 minutes.
    • M30 = profit within 30 minutes.
    • H1 = profit within 1 hour.
    • H4 = profit within 4 hours.
    • D1 = profit within 1 day.
    • W1 = profit within 1 week.
    • MN1 = profit within 1 month.

The window aligns to the start of the selected period and resets when a new period begins:

  • D1 resets at the start of each day (midnight, broker/server time).
  • W1 resets at the start of each week.
  • MN1 resets at the start of each month.

When the window resets, the accumulated profit is cleared and the EA is free to open new orders again — provided your other strategy modules also allow it.

Suppose your Maximum profit is set to $16 with a Timeframe of D1, and your EA closes its second winning trade at 16:00, pushing the day’s total profit past $16. New orders are now blocked for the rest of that day.

The block is not lifted 24 hours later (16:00 the next day). Instead, it is lifted when the D1 window resets at midnight (00:00), because the next day starts a fresh $0 profit count. From midnight onward the EA can open its next order.

We could’ve built a module which closes all current orders when the maximum profit has been reached, but we decided not to and instead only prevent opening new orders. Why? We believe when an EA opens an order it should allow the order to run its normal course, instead of potentially being cut off premature. We believe that maximum profit shouldn’t be an afterthought, but should be a well thought out part of the EA. Therefore we recommend the following approach: when you want a maximum of 5% of profit a day without passing that percentage, then please make sure that the sum of your maximum profit (of this module) and your Take profit percentage (from the Take Profit module) will never pass 5%. So if your Take profit module has a TP of 1% of equity, then you would be wise to set this module to 3.5 % of equity.