
Learn an RSI-based mean-reversion strategy on the euro dollar hourly chart with MQL5 advanced decomposition trade management, using trailing stops and volume-weighted averaging to manage risk and profits.
Modify the calculation interval so the ontick function runs only on new candlesticks, waiting for candle close before signaling trades, using a new bar check via the bars function.
Include the trait and position info header files to access the C trait and position info classes, then initialize objects to manage slippage, magic numbers, and trade entries.
Regulate the trade count in MQL5 by building two functions: count by type (buy/sell) and by comment, differentiating cost averaging from normal trades for trailing stops.
Develop buy and sell signals using RSI crossing overbought and oversold thresholds (70 and 30) for entry decisions. Implement counter-trade signals to protect the equity curve.
Set up risk controls for entries by defining balance-based lot sizing, volume increase and decrease, and auto-adjusted lot size within max, min, and step constraints.
Learn to execute buy and sell trades in MQL5 by defining trade comments, building buy and sell functions, handling signals, and normalizing lots with max/min constraints in OnTick.
Implement a trailing stop loss in MQL5 by configuring trail parameters, converting pips to price, and dynamically updating stops for each eligible trade using buy and sell logic.
Create two functions to identify the oldest buy price and oldest sell price from a basket of trades, enabling decomposition trade management with partial closes as prices move.
Learn to implement a partial close in mql5 to decompose the oldest trades, reducing risk by testing position criteria and closing a portion by lot subtract.
Create double-type functions to compute the next buy and next sell prices for cost averaging trades, ensuring a minimum distance from previous entries using open prices and position data.
Describe two mql5 trade management functions for cost averaging, handling buy and sell, with partial closes, dynamic lot sizing, and trailing take profit logic.
Develop an average price function in MQL5 to compute the weighted average price of trades, establish break-even for cost-averaging baskets, and add a small profit in pips.
Implement two functions to manage trailing take profit for buy and sell trades, looping through positions, filtering by symbol and type, and modifying trades to secure profitable exits.
Finalizes the expert advisor by integrating quintic and entree functions, applying trailing stop losses for buy and sell trades, managing cost averaging, and releasing the RSI handle before testing.
This lecture demonstrates testing and debugging a decomposition trade management expert advisor in MetaTrader, using RSI signals, cost averaging, and visual mode across EURUSD 2020–2025.
Master decomposition trade management to develop trading strategies and algorithmic tools, understand price movements, and enhance your trading results in algorithmic trading.
The worst of trading systems can be turned into a jewel when the correct and befitting trade management strategy is implemented. Trade management is what really makes or breaks a strategy. Strategizing on how to exit in profit or loss is paramount to long term profitability when trading in the currency markets. Having a solid trade management technique is far better than trying to optimize the entry logic for your strategy.
In this course, I am very proud to introduce a brain child of my imagination, a truly unique and revolutionary technique for managing trades. I came upon this trade management by mistake while trying to develop a loss recovery MQL5 marketplace product that saves trading accounts in an equity drawdown. Because of the manner in which it works, I decided to name it Decomposition trade management.
To demonstrate decomposition trade management, am going to use an RSI mean reversion strategy. So in this course, am going to teach you how to code an RSI mean reversion system that utilizes Decomposition trade management. So I shall first guide you through the logic of the strategy we are going to develop. Then we shall focus on developing the entry logic of the EA using programming tools. After that, we shall develop the risk management part of the EA, then finally we shall focus on how we shall close our trades using the ingenious trade management technique proposed in this course. I'll walk you through the entire logic of the code, ensuring you understand each step of the process.
If you're still familiarizing yourself with MQL5, don't worry. As long as you understand the basics, this course is perfect for you. I'll patiently guide you through every step, ensuring you grasp the concepts behind each line of code. By the end of this course, you'll have gained the skills necessary to code similar trading models based on Decomposition trade management.
So, hit the enroll button now and join me on this exciting journey of coding a Decomposition trade management based trading strategy using the MQL5 algorithmic trading language!