
Explore market structure by highs and lows to spot buying power, selling pressure, and trend, using zigzag indicator to identify highs and lows for expert advisors and algorithmic trading.
Learn a market structure based expert advisor strategy for euro-dollar on a 5 minute chart, using lower highs and lower lows with hedging via buy stop and sell stop.
Build a market structure expert advisor template, add general inputs (symbol, slippage, period), and customize the chart to candlesticks with colors for a cleaner view.
Set the calculation interval to run only on new bars, using a new bar check and old bar tracking to execute actions at candlestick close, speeding testing and optimization.
Set up and retrieve zigzag indicator values by defining external depth, deviation, and step inputs, obtaining the zigzag handle, and copying buffer data for recent price values.
Develop a zigzag extremes function in MQL5 to detect highs and lows for a market structure based EA, validating a dynamic array, resizing, reversing, and returning a boolean.
Initialize global high and low holders and a dynamic extremes array, store zigzag highs and lows, then map them to hi and lo for bullish and bearish trends.
Implement bullish and bearish breakout detection in an MQL5 expert advisor with two boolean functions, using the previously closed candlestick, highs and lows, and trend context.
Regulate trades in an MQL5 advisor by counting trades through position comments, filtering positions by symbol and advisor traits, and combining buy and sell counts into a total trades function.
Calculate auto loss size based on account balance using a risk input group, balance increase, and volume increase, then clamp to symbol limits with two-decimal rounding.
Add inputs to manage trades in the expert advisor, including a displacement in pips and a tuple profit factor, and initialize dynamic trade variables and comments for smoother execution.
Develop breakout trading in mql5 by coding bullish break entries and hedge pending orders, calculate the distance to hedge, and set take profits with a 2:1 risk/reward.
Create a trailing take profit function in MQL5 that accepts a position comment and a new take profit price, then loops through positions by symbol and modifies take profit.
Calculate the mean entry price for buy and sell trades by creating two functions that loop through positions, filter by symbol and trade type, and return the average price.
Create two MQL5 functions: one counts pending orders by a specific comment, the other deletes matching pending orders, filtering by comment and symbol, and logs failures when deletion fails.
Enter a cost averaging strategy using pending limit orders in mql5, implementing c buy limit and c sell limit functions with next buy/sell price and distance adjustments.
Implement a grid trading strategy by coding buy and sell grid cells, using cost averaging, and updating next buy/sell prices, while managing orders and trailing take profits.
Manage trades in a market-structure based MQL5 EA by implementing trailing TP logic, using position type, and deleting or adjusting pending orders as trades unfold.
Test and debug the expert advisor by compiling, adjusting zig zag inputs, and validating trades. Demonstrate grid trading, market structure concepts, and multi-symbol triangular trading with take profit and break-even.
Explore market structure principles to design and test a principle-based expert advisor, and apply trade management ideas to tailor your own MQL5 project.
Hello everyone, in this course, I would like to express the value of implementing knowledge about the market structure and its use in obtaining a trading bias using the MQL5 algorithmic trading programming language.
Together, we shall build a strategy based on price action principles that uses trend transition structures to make entries in the market. This allows us to actively participate in newly forming trends and capitalize on the predictability of market structures.
We shall start by introducing you to the concept of market structure and why it’s a pillar of success in many trend following systems, we shall also demonstrate how to model market structures using the Zig Zag indicator.
We shall then do a brief overview of the strategy we are going to code in this course by studying its entry logic, it’s ingenious trade management protocols and how it will manage risk.
We shall then start coding our strategy from scratch using the MQL5 language with explanations at every step of the journey to help you understand the logic of our actions so as to inspire you to develop ideas based on the knowledge gained from the coding part of this course.
As already said before In this course, we shall also apply safe and ingenious trade management techniques to ensure that we protect any wins we made by making sure that losses don’t eat into them. We shall not use any martingale techniques ensuring that we trade using safe position volumes that can allow account growth without taking considerable risks.
For those that are still finding their way with MQL5, as long as you understand the basics of MQL5, this course is for you. We will patiently guide you through every step of the strategy development process and walk you through every line of code we shall craft. Hopefully, by the end of the course, you will have gained the necessary skills to code similar trading strategies and be able to appreciate how the Market structure concept can improve trading stems.
So hit hard on that enroll button now and join me in this incredible journey of coding the a reversion system.