ChannelEA2: Your Go-To System Trading Tool for MetaTrader 5

Mike 2018.06.16 18:52 18 0 0
Attachments

ChannelEA2 is a handy trading system that utilizes a channel drawn by the ChannelInd indicator. While it can work alongside this indicator, it's not a requirement, as the EA independently calculates all necessary data.

This EA operates on a specific time schedule. At the designated trading times set in the EA’s parameters, it places two pending stop orders at the channel's borders and sets Stop Loss levels on the opposite side—without applying Take Profit levels. When the trading session ends, all open positions are closed, and any untriggered orders are deleted.

Note: This Expert Advisor is intended for training purposes.

ChannelEA2 comes with eight customizable parameters:

  • Begin Hour - The time when trading starts;
  • End Hour - The time when trading ends;
  • Magic Number - A unique ID for the EA’s positions;
  • Lots - The volume of positions to open;
  • Price Slippage - The maximum allowable slippage when opening a position;
  • Multiplier for Stops - A spread multiplier used to calculate proper distances for stop orders (*).
  • Wait Time for Environment Update - Time in seconds to wait for updates to the trading environment (**);
  • Attempts to Get Environment State - The number of attempts to get accurate trading environment information (***).
* For pending orders (and Stop Loss or Take Profit), there’s a minimum distance for placing stop orders, known as StopLevel. This means that pending orders cannot be placed closer than this distance to the current price. If a StopLevel is zero, it indicates a floating state, not an absence. Typically, the minimum distance reflects about double the spread, but sometimes even that isn’t enough. This is why the EA uses a custom spread multiplier for calculating the minimum distance for pending orders.
** When you send a trading order to the server, delays in execution can lead to incorrect counting of market positions. If an "undefined" state is detected, the EA will pause for the specified seconds before checking the environment again.
*** The number of wait attempts within a single tick is adjustable in the EA parameters. Once it exhausts the allowed attempts to get accurate environmental info, the EA will halt processing and wait for the next tick, repeating attempts as needed.

To test the strategy, we ran the default settings using the EURUSD H1 in a 1-minute OHLC mode from January 2, 2017, to March 29, 2018.

Next, we optimized the trading start/end parameters (Begin Hour and End Hour) for EURUSD H1 in the same 1-minute OHLC mode:

The best results were achieved with these settings:

  • Begin Hour = 8;
  • End Hour = 10.

List
Comments 0