Open order V3
The Open order V3 module opens an order when an Open Buy or Open Sell signal becomes true. It can keep one or more orders open at the same time. Every EA has exactly one module for opening: it is in the Strategy column from the start and can’t be removed.
How it works
Section titled “How it works”- An Open signal changes from not true to true. On that quote, the module tries to open an order.
- No order opens when a module which prevents opening blocks it on that quote. The signal is not remembered: when the block ends while the signal is still true, no order opens.
- While the Open signal stays true, no extra order opens. A next order needs the signal to become true again: false on at least one quote, then true.
Settings
Section titled “Settings”- Maximum open orders: how many orders this EA can have at the same time: open and pending orders together, buy and sell.
- Hedging: allows the EA to have buy and sell orders open at the same time. Pro only.
- Off: when a buy order is open, only Open Buy is evaluated (for an additional buy order, if Maximum open orders allows it). When Open Buy and Open Sell become true on the same quote, no order opens and the EA shows an error.
- On: both Open Buy and Open Sell keep being evaluated, so the EA can open a sell order next to a buy order. Both can even open at the same moment when both signals are true. On MT5 this needs a hedging account; on a netting account the EA shows the error “Unable to allow hedging on non-hedging account.”
Changes compared to the V2 module
Section titled “Changes compared to the V2 module”- V2 doesn’t close an order while the Open signal of that side is still true. The idea: closing it would open a new order of the same type right away, wasting money on commissions and spreads. But it confused traders when a signal stayed true until the end of a bar and the SL or TP was not executed.
- V3 decides only on the first quote on which the signal is true. On the next quote, if the SL or TP is hit, the order closes, even if the signal is still true. A new order then waits until the signal has been false for at least one quote and becomes true again.
With V2, the remedy was to wait for the cross to expire (on the next bar) or to block the Open signal after opening with the Time gap between orders module.
Related
Section titled “Related”- Open order V2 (legacy): the previous version
- Trading Signals: the Open signals this module reacts to
- Modules which prevent opening: when no order may open
MetaTrader is a registered trademark of MetaQuotes Ltd. EA Builder Pro is not affiliated with MetaQuotes.