Time-based orders allow you to request your order be filled at a specific time of day. These can be incredibly helpful when trading according to a high impact economic news event.

However, there are restrictions on these depending on the specific exchange or market you are trading.

Despite some technical limitations, these time-based orders are possible in MetaTrader 4 (MT4). These revolve around expert advisors or Eas.

MT4 EAs function based on incoming ticks. Whenever the bid/ask price changes by a micro pip or more, the EA is triggered to do something.

When the markets hum along rapidly, this effect is not noticeable. But, when the quote flow slows down, it can cause the EA to sleep entirely through your trading window.

Many news traders want to bracket buy- and sell-stops around the price at 08:29 on NFP Friday. Everyone knows that a major news event is about to release, causing trading to slow along with the flow of quotes.

As a result, there is a possibility the pending orders may not set in time. That is unless there is an incoming tick in the 60 seconds between 08:29 and 08:30.

This seems unlikely to many novice traders, but it happens frequently enough that we inevitably receive these types of questions whenever we program a time-based order placement EA.

The workaround typically satisfies most traders. EAs place an order at the first available tick within a certain time window. Using NFP as the example, the EA might seek to place bracket orders around the first tick between 08:29-08:32. The chances of making it 2 minutes past 08:30 without a single tick are low. Given that you are taking the first tick, the orders will successfully bracket around the price most of the time.

It is essential to keep in mind how the backend works for those one-off events where the orders do not function as desired.

MetaTrader addressed the time weakness of MT4 in their MT5 update, which offers event-driven programming. This made it possible to rewrite MQL4 EAs into MQL5 and demand an action at a precise time.

The MQL5 timer actively watches the clock. So regardless of what the markets do, the EA can know to wake up and do whatever action is needed. This is one of the few scenarios where converting from MQL4 into MQL5 comes with obvious advantages.

0 Likes
121 Views

You may also like

Comments are closed.