The News Keeper Expert Advisor is created to implement the strategy of news trading.
- It places pending orders at a specified time (+/- specified number of seconds) at a specified distance (+/- points) from the current price, shortly before the release of the news.
- Modifies the pending orders using two methods — with the arrival of a new tick (1) or with the arrival of a new bar (2)
- Instantly removes the second opposite order once the first triggers
- Expiration of orders by seconds
- Time channel for opening positions in cases of alternating ticks
- Trades are marked with individual Magic numbers which eliminates the conflict during the operation in conjunction with other advisors.
- Sent Sell Stop — Set Sell Stop.
- Sent Buy Stop — Set Buy Stop.
- Date time input — Date and time to place orders.
- Add sec (open) — N seconds.
In MT4 the EA operation takes place at the arrival of a new tick. Due to the sluggish market situation (especially at night), a tick might not arrive in one second time — in that case the orders will not be placed. For such situations the function 'Add sec' is implemented, which allows to set the range of 4 seconds, for example. The delays are unlikely during the daytime. At night, it is recommended to set the range to 5-30 seconds, depending on the activity in the market.
Example 1. Day
Expected News Release Date 10.10.2010 15:30
You set the 'Date Time Input' to 10.10.2010 15:29:57, i.e. 3 seconds before the news release. In this case, Add sec must be equal to 2. In fact, you specified the order placement range of 15:29:57 — 15:30:59 to the EA, where the difference between 57 and 59, equal to 2 seconds, is specified in the Add sec parameter.
Example 2. Night
Expected News Release Date 10.10.2010 03:30
You set the 'Date Time Input' to 10.10.2010 03:29:50, i.e. 10 seconds before the news release. In this case, Add sec must be equal to 9 seconds. In fact, you specified the order placement range of 03:29:50 — 03:29:59 to the EA, where the difference between 50 and 59 of 2 seconds is specified in the Add sec parameter.
This gives sufficient range in the case of the overnight trading and variable ticks.
Points From Price — N points on 5-digits
The number of points of the offset from the current price for the EA to place order(s). In case a strong movement is expected, it is recommended to set the value to 150+ points (on 5-digits). If there is a possibility that the movements will be insignificant before the news release (for example, during nighttime), then N can be reduced, e.g. to 70+ points.
- Expiration? — Automatic removal of orders after N (seconds).
Expiration (sec) — N seconds.
This parameter specifies the time, after which the EA will automatically delete the pending orders in case they both did not trigger.
Expiration is calculated by the formula: Time specified in Date Time Input + N seconds in the Expiration (Sec) field.
Date Time Input = 15:29:50
Add Sec = 9 seconds
Expiration? = True
Expiration (sec) = 15 seconds
The EA will delete orders exactly at 15:29:50 + 15 seconds, that is at 15:30:05.
- Modify orders (new tick)? — modify the orders with the arrival of a new tick, i.e. keep the distance from the price, specified in the "Points From Price".
- Modify orders (new bar)? — modify the orders with the arrival of a new bar, i.e. keep the distance from the price, specified in the "Points From Price".
- Breakeven? — breakeven (on/off)
- Breakeven if (points) — breakeven, if the number of profit points on 5 digits = N.
- Trailing Stop (points) — trailing stop, if the number of profit points on 5 digits = N (if = 0, disabled).
- Trailing Step (points) — trailing stop step, the number of points on 5 digits = N.
- Before using on a live account, test the EA.
- Use VPS or hosting server with minimal network latency to the broker's server.
- Low spreads + low commission + high quality execution are important when choosing a broker to trade.
- Carefully set the input parameters for the selected instrument according to your style and tactics.
- Use only the accounts with fixed spread without re-quotes.
- Consider the possible slippage.