Discussing the article: "Introduction to MQL5 (Part 25): Building an EA that Trades with Chart Objects (II)"
More flexible and powerful solution of this kind has been presented in the article TradeObjects: Automation of trading based on MetaTrader graphical objects.
TradeObjects: Automation of trading based on MetaTrader graphical objects
- 2017.10.13
- www.mql5.com
The article deals with a simple approach to creating an automated trading system based on the chart linear markup and offers a ready-made Expert Advisor using the standard properties of the MetaTrader 4 and 5 objects and supporting the main trading operations.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Introduction to MQL5 (Part 25): Building an EA that Trades with Chart Objects (II).
This article explains how to build an Expert Advisor (EA) that interacts with chart objects, particularly trend lines, to identify and trade breakout and reversal opportunities. You will learn how the EA confirms valid signals, manages trade frequency, and maintains consistency with user-selected strategies.
The user will manually draw two trend lines on the chart, which the EA will use. One line showing a downtrend is drawn from a higher point to a lower point, while another showing an uptrend is drawn from a lower point to a higher position. The EA will use their names to identify the appropriate objects on the chart. This implies that the user will enter the trend lines' precise names in the input settings. Even when there are several trend lines on the chart, this method provides the EA with a clear reference for which things to keep an eye on.
Additionally, the user will have the ability to specify the timeframe that the EA should track, the lot size that they would want to utilize, and the trading style that they would like to employ. Both, where the EA handles both reversal and breakout-and-retest conditions depending on how the price behaves around the trend line, and reversal, where the EA opens a trade when the price touches the trend line and displays a reversal signal, are among the available trading modes. The Breakout and Retest mode waits for the price to break through the trend line before opening a trade.
Author: Israel Pelumi Abioye