Strategy modules
Modules are the building blocks of your EA and are defined under the Trading Strategy part of the system. The modules are divided into 3 categories:
Module for opening
Module for opening take input from Signals and Modules which prevent opening modules and open, or close, orders as a result.
Open order V3 (new)
Please note this module replaces the obsolete (V2) module.
The Open order - Open module, will allow one or multiple orders/ positions to be opened at the same time, but won’t hedge. It will only open a consecutive order when the signal has changed from not-active to active or firing in the opposite direction (going from an active ‘Open Buy’ signal to an active ‘Open Sell’ signal or vice-versa).
Settings- Maximum open orders: The amount of orders which can be open at the same time by this EA.
When an Open Signal is active it will try to open an order, unless the Prevent Open modules are preventing it or when a Close(Buy/ Sell) Signal is active at the same time.
Changes compared to the V2 module:
Open module V2 waits to close orders as long as the current open signal (with its conditions) are active. The general thought behind this is that closing an order, while an open signal is active, would cause a new order (of the same type) to be opened directly after closing the current order, causing the account to waste balance on commissions and spreads. This logic caused some confusing amongst traders when a signal would be active till the end of a bar and thus SL/ TP not being executed by the EA. The current remedy is either wait for the cross to expire (on the next new bar), or to block the open signal after opening an order, by adding the 'Time gap between orders' module.
Open module V3 will only activate on the very first processed quote which results in an active signal and decides on opening/ closing only at that moment. On the next quote, if SL/ TP is hit, the order will be closed, even if all the conditions of the signal are still true. So with V3, if an order closes after the conditions of a signal are met, a new order won't be opened. Instead, it will wait until at least the signal is not active for one quote and then becomes active again.
Open order V2 (obsolete)
Please note there's a new and improved version of this module which contains changes to trading behavior: Open order V3 (new).
The Open order - Open module, will allow one or multiple orders/ positions to be opened at the same time, but won’t hedge. It will only open a consecutive order when the signal has changed from not-active to active or firing in the opposite direction (going from an active ‘Open Buy’ signal to an active ‘Open Sell’ signal or vice-versa).
Settings- Maximum open orders: The amount of orders which can be open at the same time by this EA.
When an Open Signal is active it will try to open an order, unless the Prevent Open modules are preventing it or when a Close(Buy/ Sell) Signal is active at the same time.
Modules for closing
Modules for closing take orders as input and close orders when one or more condition, based on the settings, are met. There are currently 10 modules for closing:
Stop loss
The Stop loss - Close module, will wait for a minimum of loss and then close the order(group).

- Order scope: the scope (or 'group') of orders which is evaluated for loss. Single means every order is evaluated individually and closed individually. Symbol/ order type creates a group per Symbol and type (Buy or Sell), Symbol creates a group per Symbol and Basket creates a group for all orders of the account.
For each group it goes that the orders have to be created by the same EA or EA's with the same Magic Number (EA property). - Value: the amount the group is evaluated against. Enter a positive value.
- Unit: the unit of measurement. Pips, Money or a percentage of equity compared to balance.
Stop loss - Trailing
The Stop loss - Trailing – Close module, will wait for the price to go down to the level of where the trail is and then close the order. The module effectively sets the SL of an order (on the bottom side of a buy order).
Settings- Profit threshold (pips): this is the profit threshold (in pips) an order/position has to reach for the module to start trailing. Before this value is reached, the module will have no effect.
Example: if this value is set to 30, the trail will start when the order/position has a profit of 30 pips. - Trail start value (pips): the profit value (in pips) where the trailing starts.
Examples: if this is set to 20, the order will close as soon as the order has 20 pips of profit. If set to 0, the order will try to break-even. - Trail step size: the amount the trail will go up when the profit increases. Let's assume you put the setting to 1. If the profit increases 1 pip above the threshold value, the trail will move (in this example) from 0 to 1. After another pip of profit, from 1 to 2, etc.. The order will, under normal conditions, now best case create 2 pips of profit. If the setting is set to 2, it will go up 2 pips for every pip of additional profit, instead of 1.
- Trail minimum distance (pips): the trail will not get closer to the current price than the set value, in pips. This is usefull when using a Trail step size of more than 1 and you want the trail to keep a certain distance from the current price. Warning: when set to 0 or any negative number, the trail will overtake the price, causing the order to close.
Example: You have a Profit Threshold of 30 pips and you set the Trail start value (pips) to 20. You have a Trail step size of 1. The trail will now always be 10 pips behind the market price. However, if you have a step 10 and the price goes up 1 pip, then the trail will now be at:
Current profit - Trail start value (pips) + (Trail step size * profit movement) =
31 - 20 + (10 * 1) = 30
So the trail is 1 pip behind the current market price. If the market goes up one more pip, the trail will still be 1 pip behind the market price, because the minimum distance is 1 pip. If you would have a Trail minimum distance (pips) of 0.1 pip then the trail would now be 0.1 pip behind the market price. If you would put Trail minimum distance (pips) to 0, the SL would match the market price and the order would get closed even though the price never went down to hit SL. So, if you don't want an order to get closed when the price is breaking out in your direction, then use a value of 0.1 or higher.
Stop loss - Catching up trail
The Stop loss - Catching up trail - Close module, is a module that allows a trader to set a trailing stop loss value, that decreases when a gain0 pips profit is touched, and after gain1 pips profit becomes a “-1” stop loss tracker. The module can be used as a pure trailing stop loss follower if so desired, by setting the gain0 and gain1 values to an unrealistically high pip-value (for example 1000). It allows the trader to use a gradually increasing gain by setting gain1 > gain0, or to instantly jump to the “-1” tracking behaviour from a certain pip-profit onwards, by setting gain0 equal to gain1 .
Settings- Profit threshold (pips): A value in pips. This setting determines at what point the module activates. It expects a value from 0 pips or higher. When set to 0, the module activates at the start of a trade by setting the trailing stop loss to the “Offset” value. When set to (for example) 10, the module activates as soon as a profit of 10 pips compared to the start of the trade is realized.
- Offset (pips): A value in pips. This value sets the initial offset of the trailing stoploss module. A value of 10 sets the offset to: [profit in pips at activation] – 10 pips. The module expects a positive value.
- Gain 0 (pips): A value in pips. The typical use-case is that there is a certain profit realized, and the trader decides that the moment to cash-in is nearing. From a profit value of Gain0 in pips, the trailing stop loss starts to decrease the trailing offset. The module expects a positive value, greater than or equal to the Threshold.
- Gain 1 (pips): A value in pips. Gain tracking is initialized by the Gain0 parameter, and from that point onward the module starts to decrease the trailing offset whenever the profit in pips increases. When the profit in pips reaches the Gain1 value, the module becomes a “-1” tracker, tracking the currency-pair exchange rate – 1 pip. As soon as the rate decreases by 1 the module stop loss is touched and the order is executed.
- Trail minimum distance (pips): the trail will not get closer to the current price than the set value, in pips. This is usefull when using a Trail step size of more than 1 and you want the trail to keep a certain distance from the current price. Warning: when set to 0 or any negative number, the trail will overtake the price, causing the order to close.


Stop loss - Conditional
The Stop loss - Condition – Close module, will wait for the price to drop to the level of where the trail is and then close the order(group). Be aware that the signal activates at any time the precondition activates, profit or loss, this is irrelevant for the module. It is up to you to define a good precondition to set the order's SL. The SL is the value where the order will close when the current price is moving in direction of (but not necessarily within) loss and hits this value.

- Enabled for: if the module is enabled for buy orders, sell orders, or both. If only for buy orders and a separate signal is required for sell orders, simply add this module again.
- Precondition: the condition when the SL will be set. Before the signal activates, the module remains inactive. When the signal activates, SL will start at the offset value of the SL offset parameter. Not setting the precondition defaults into activation the moment the order is opened.
- SL start distance (pips): the amount of pips the SL is behind the current price, which is set the moment the Precondition activates.
- Trail step size: the amount the trail will rise when the profit rises. Let's assume you put the setting to 1. If the profit rises 1 pip, the trail will move (in this example) from 0 to 1. After another pip of profit, from 1 to 2, etc.. The order will, under normal conditions, now at least create 2 pips of profit. If the setting is set to 2, it will rise 2 pips for every pip of additional profit, instead of 1.
- Trail minimum distance (pips): the trail will not get closer to the current price than the set value, in pips. This is usefull when using a Trail step size of more than 1 and you want the trail to keep a certain distance from the current price. Warning: when set to 0 or any negative number, the trail will overtake the price, causing the order to close.
If you want to create a flat SL line you can set Trail step size to 0. Now it's not really trailing, but you created a SL line based on a Signal.
Stop loss - Conditional (Pro)
The Stop loss - Conditional (Pro) – Close module, will wait for the price to drop to the level of where the trail is and then close the order. The SL is the value where the order will close when the current price is moving in direction of (but not necessarily within) loss.

- Enabled for: if the module is enabled for buy orders, sell orders, or both. If only for buy orders and a separate signal is required for sell orders, simply add this module again.
- Precondition (optional): the condition when the SL will be set. Before the signal activates, the module remains inactive. When the signal activates, it will set the SL at the value of the SL start value parameter. Not setting the precondition defaults into activation the moment the order is opened.
- SL start value: the value the SL will be set.
- When to remove SL: the signal which removes the SL.
- SL offset (pips): the amount of pips away from the SL start value, to adjust where you want the SL to start.
- Trail step size: the amount the SL will rise when the profit rises. Let's assume you put the setting to 1. If the profit rises 1 pip above the threshold value, the trail will move (in this example) from 0 to 1. After another pip of profit, from 1 to 2, etc.. The order will, under normal conditions, now at least create 2 pips of profit. If the setting is set to 2, it will rise 2 pips for every pip of additional profit, instead of 1.
- Trail minimum distance (pips): the trail will not get closer to the current price than the set value, in pips. This is usefull when using a Trail step size of more than 1 and you want the trail to keep a certain distance from the current price. Warning: when set to 0 or any negative number, the trail will overtake the price, causing the order to close.
- Close percentage: the percentage of the position that will be closed by this module. Assume you have a position of 1 Lot and you set the value to 50, this module will close 0.5 Lot of the current position. When you have another module set to value 50 as well, it will close 0.25 Lot when that module triggers, which is 50% of the remaining 0.5 Lot. If you wanted the second module to close the entire order/ position, please set the second module's value 100.
- Reuse module after partial close: if module's Close percentage is set to a value smaller than 100, then the module will try to close a part of the order. This setting decides if this module can be used again (if the precondition is met) for the same order.
If you want to create a flat SL line you can set Trail step size to 0. Now it's not really trailing, but you created a horizontal SL line.
Take profit
The Take profit - Close module, will wait for a minimum of profit and then close the order(group).

- Order scope: the scope (or 'group') of orders which is evaluated for profit. Single means every order is evaluated individually and closed individually. Symbol/ order type creates a group per Symbol and type (Buy or Sell), Symbol creates a group per Symbol and Basket creates a group for all orders of the account.
For each group it goes that the orders have to be created by the same EA or EA's with the same Magic Number (EA property). - Value: the amount the group is evaluated against. Enter a positive value.
- Unit: the unit of measurement. Pips, Money or a percentage of equity compared to balance.
Take profit - Trailing
The Take profit - Trailing – Close module, will wait for the price to go up to the value of where the trail is and then close the order. The module effectively sets the TP of an order (on the up side of a buy order).
If you're instead looking for a module to trail your profit while the price is moving up (for a buy order): use the Stop loss trailing - Close module., which sets the SL on the bottom side of a buy order.
- Loss threshold (pips): this is the loss threshold an order/position has to reach for the module to start trailing. Before this value is reached, the module will have no effect.
Example: if this value is set to 30, the trail will start when the order/position has a loss of 30 pips. - Trail start value (pips): the profit value (in pips) where the trailing starts.
Examples: if this is set to 20, the order will close as soon as the order has 20 pips of loss. If set to 0, the order will try to break-even. - Trail step size: the amount of pips the trail will follow when the loss increases. Let's assume you put the setting to 1. If the loss increases by 1 pip compared to the Start value (pips), the trail will move (in this example) 1 pip. After another pip of loss, a 2nd pip, etc. The order will, under normal conditions, now best-case close at 2 pips of loss. If the setting is set to 2, it will follow 2 pips for every pip of additional loss, instead of 1.
Take profit - Conditional
Use this module when you want to close the order when the order is recovering. This is an uncommon scenario for most users. Most users want the trail to be on the bottom side of the price. In that case, use the Stop loss - Conditional Module.
Take profit - Condition – Close module, will wait for the price to go up to the level of where the trail is and then close the order(group). Be aware that the signal activates at any time the precondition activates, profit or loss, this is irrelevant for the module. It is up to you to define a good precondition to set the order’s TP. The TP is the value where the order will close when the current price is moving towards more profit and hits this value.

- Enabled for: if the module is enabled for buy orders, sell orders, or both. If only for buy orders and a separate signal is required for sell orders, simply add this module again.
- Precondition (optional): the signal when the TP will be set. Before the signal activates, the module remains inactive. When the signal activates, TP will start at the offset value of the TP offset parameter. Not setting the precondition defaults into activation the moment the order is opened.
- TP start distance (pips): the amount of pips the TP is ahead of the current price, which is set the moment the Precondition activates.
- Trail step size: the amount the trail will move towards the price when the loss increases. Let's assume you put the setting to 1. If the loss increases 1 pip, the trail will move (in this example) from 0 to -1. After another pip of loss, from -1 to -2, etc.. The order will, under normal conditions, now best case create 2 pips of loss. If the setting is set to 2, it will go down 2 pips for every pip of additional loss, instead of 1.
If you want to create a flat TP line you can set Trail step size to 0. Now it’s not really trailing, but you created a TP line based on a Signal.
Take profit - Conditional (Pro)
Use this module when you want to close the order when the order is recovering. This is an uncommon scenario for most users. Most users want the trail to be on the bottom side of the price. In that case, use the Stop loss - Conditional (Pro) Module.
The Take profit - Conditional (Pro) – Close module, will wait for the price to go up to the level of where the trail is and then close the order. The TP is the value where the order will close when the current price is moving towards (more) profit.

- Enabled for: if the module is enabled for buy orders, sell orders, or both. If only for buy orders and a separate signal is required for sell orders, simply add this module again.
- Precondition (optional): the signal when the TP will be set. Before the signal activates, the module remains inactive. When the signal activates, it will set the TP at the value of the TP start value parameter. Not setting the precondition defaults into activation the moment the order is opened.
- TP start value: the value the TP will be set.
- When to remove TP: the signal which removes the TP.
- TP offset (pips): the amount of pips away from the TP start value where you want the TP to start.
- Trail step size: the amount the TP will move towards the price when the loss increases. Let's assume you put the setting to 1. If the loss increases 1 pip, the trail will move 1 pip towards the price as well.
- Close percentage: the percentage of the position that will be closed by this module. Assume you have a position of 1 Lot and you set the value to 50, this module will close 0.5 Lot of the current position. When you have another module set to value 50 as well, it will close 0.25 Lot when that module triggers, which is 50% of the remaining 0.5 Lot. If you wanted the second module to close the entire order/ position, please set the second module's value 100.
- Reuse module after partial close: if module's Close percentage is set to a value smaller than 100, then the module will try to close a part of the order. This setting decides if this module can be used again (if the precondition is met) for the same order.
Tip: If you want to create a flat TP line you can set Trail step size to 0. Now it's not really trailing, but you created a horizontal TP line.
Maximum lifespan
The Maximum lifespan - Close module, will wait for an amount of time and then close an order, if the order wasn't closed yet.
Settings- Maximum minutes: The amount of minutes after which an order is closed compared to it's open time.
Modules which prevent opening
Modules which prevent opening prevents opening any new orders.
Margin requirements
The Margin requirements – Prevent open module, will prevent opening orders based on your margin to protect your account. We advise all live traders to use this module with defensive settings.
Settings- Minimum free margin (%): the amount of free margin (in percentage) you require to remain after opening an order/ position. Normal value: 0 - 100. 0 = no limit.
By using this setting you prevent your account be be called or stopped out after losing a small amount of margin. - Maximum ea margin (%): the amount of margin (in percentage) this EA can use. This setting is useful when running multiple EA's on a single account and you want to make sure there's always some margin left for your best EA to open at least a position.
Normal value: 0 - 100. 0 = no limit.
Maximum spread
The Max Spread – Prevent open module, will wait for the spread to be less than a set amount. If the amount is larger, it will prevent opening a new order.
Settings- Maximum spread (pips): the maximum amount of pips between bid and ask.
Trading session
The Trading session – Prevent open module, will wait for opening times and only open orders between opening and close times.
Example: we set the module to trade between 09:00 and 15:00. All the module does is prevent opening (it's a prevent open module) orders outside of the session, but it doesn't make sure orders are opened at 09:00. So, if you set the trading session to between 09:00 and 15:00, then you allow an order to be opened at 9:30 or 10:00, but not at 06:00 or 18:00 (outside of the session). In this example, if the Open signal (Open buy/ Open sell) activates at 09:10 then that's a valid opening time.
The user (you) will have to make sure the correct times are set based on your server's time.
Orders will still be closed by Close- Signals and Modules outside these times.
This module will not automatically close orders. Multiple modules of this moduletype can not be added. This module can be used in collaboration with the Trading session exclusion module.
- Start Hour (servertime): the hour (using 0-24) when opening new orders/ positions start. Setting it to 13 equals 1PM.
- Start Minute (servertime): the minutes (0-60) when opening new orders/ positions start.
- Stop Hour (servertime): the hour (using 0-24) where opening orders/ positions have to be stopped. (0-24).
- Stop Minute (servertime): the minutes (0-60) when opening new orders/ positions have to be stopped.
Trading session exclusion
The Trading session exclusion – Prevent open module, will prevent trading during configured times. The user (you) will have to make sure the correct times are set based on your server's time.
Orders will still be closed by Close- Signals and Modules outside these times.
This module will not automatically close orders. Multiple modules of this moduletype can be added. This module can be used in collaboration with the Trading session module.
- Start Hour (servertime): the starting hour (using 0-24) of preventing opening new orders/ positions. Setting it to 13 equals 1PM.
- Start Minute (servertime): the starting minutes (0-60) of preventing opening new orders/ positions.
- Stop Hour (servertime): the end hour (using 0-24) of preventing opening orders/ positions. (0-24).
- Stop Minute (servertime): the end minutes (0-60) of preventing opening orders/ positions.
Time gap between orders
The Time gap between orders – Prevent open module, will wait a set amount of time between the last closed order and a new open order.
Settings- Minimum time (minutes): the amount of minutes between two orders (from open- or closetime of the previous order to a new order).
- Apply to additional order: prevent opening an additional order when an order has recently been opened.
- Apply to closed order: prevent opening since the last closed orders.
- Reset timer on new bar: allow an order to be opened from the moment a new bar opens.
- Allow reverse order: allow a reverse order to be opened, within the set time gap, after closing an order.
Time gap after loss
The Time gap after loss – Prevent open module, will wait a set amount of time after a previous order with a loss.
Settings- Minimum time (minutes): the amount of minutes between two orders (from open- or closetime of the previous order to a new order).
- Apply before additional order: prevent opening an additional order when an open order is in loss.
- Apply after closed order: prevent opening when the most recent closed order resulted in loss.
- Maximum profit (pips): The maximum amount of profit (pips) an order may have for this rule to activate. Setting this value to -5 will allow a small degree of loss (less than 5 pips) without a time gap. Setting this value to 1 means even an order making a small profit (excluding commissions) is counted as a loss.
- Allow reverse order: allow a reverse order (a buy after a sell or a sell after a buy) to be opened in any case.
Pip gap between orders
The Pip gap between orders – Prevent open module will wait opening an additional order until there's a certain amount of price between the Open prices of orders.
Settings- Pip gap (pips): the amount of pips between multiple orders.
- Apply to orders in profit: a consecutive order will only open if the price is going 'up' (has gone into the intended direction). This setting is often used to accumulate the open position as the result of confirmation.
- Apply to orders in loss: a consecutive order will only open if the price is going 'down' (has gone in the opposite direction). This setting is often used to get into a better opening price.
Both the 'Apply to orders in profit' and 'Apply to orders in loss' can be enabled at the same time.
Important considerations
This module only prevents opening orders and does not open a new order when the gap has been formed. If you need an order to open automatically once the gap has been formed, please check out our 'Grid Trend' and 'Grid Trend reversal' EA templates and study the Open Buy and Open Sell signals.
Maximum loss
The Maximum Loss – Prevent open module, will stop opening new trades when an amount of loss has been reached, including the profit/loss of the currently opened orders.
Settings- Maximum loss: the maximum amount of loss in pips, money or percentage of your equity.
- Unit: Select pips, money or percentage of your equity.
- Timeframe: Select the timeframe (window of time) in which the loss has been reached. For example if you select D1, then all losses in the current day will add up to your total amount of loss.
Current = loss within timeframe of the chart.
M1 = loss within 1 minute.
M5 = loss within 5 minutes.
M15 = loss within 15 minutes.
M30 = loss within 30 minutes.
H1 = loss within 1 hour.
H4 = loss within 4 hours.
D1 = loss within 1 day.
W1 = loss within 1 week.
MN1 = loss within 1 month.
Afterthought from the team
We could've built a module which closes all current orders when the maximum loss has been reached, but we decided not to and instead only prevent opening new orders, why? We believe when the 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 loss shouldn't be an afterthought, but should be a well thought out part of the EA. We recommend the following approach: when you want a maximum of 5% of loss a day without passing that percentage, then please make sure that the sum of your maximum loss (of this module) and your Stop Loss percentage (from the Stop Loss module) will never pass 5%. So if your Stop Loss module has a SL of 1% of equity, then you would be wise to set this module to 3.5 % of equity.
Maximum profit
The Maximum Profit – Prevent open module, will stop opening new trades when an amount of profit has been reached, including the profit/loss of the currently opened orders.
Settings- 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 (window of time) 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.
Afterthought from the team
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 the 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. 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.
Next: Money manager