Discussing the article: "Introduction to MQL5 (Part 8): Beginner's Guide to Building Expert Advisors (II)"

 

Check out the new article: Introduction to MQL5 (Part 8): Beginner's Guide to Building Expert Advisors (II).

This article addresses common beginner questions from MQL5 forums and demonstrates practical solutions. Learn to perform essential tasks like buying and selling, obtaining candlestick prices, and managing automated trading aspects such as trade limits, trading periods, and profit/loss thresholds. Get step-by-step guidance to enhance your understanding and implementation of these concepts in MQL5.

A lot of beginners frequently post questions on the forum, and although the amazing community members respond with great advice, some self-taught users find it difficult to incorporate these answers into their programs. While the answer to a specific question is provided, it is frequently impractical to provide a detailed explanation of the entire code. Even though the code snippets and tips can be helpful, as a self-taught novice, you might still find it difficult to put everything together. With a project-based approach, this article seeks to answer these frequently asked questions and guarantees that the solutions can be applied by any EA.

In this article, we will focus on developing an EA that uses the candlestick analysis from the previous day to determine its trading direction. The EA will concentrate on selling for the day if the most recent daily candlestick is bearish and buying if it is bullish. The EA will also verify its trading signals by utilizing the close price of the day's first 1-hour candlestick. There won't be more than one open position at any given time, and the daily maximum of two trades will be enforced. It will function under stringent trade limits. Furthermore, its operation will be limited to the designated trading hours of Monday to Wednesday.

Author: Israel Pelumi Abioye