Discussing the article: "Building a Custom Market Regime Detection System in MQL5 (Part 2): Expert Advisor"
i think you bymistake uploaded the same parameter image for the refined parameters, can you share what were the refined parameters after mt5's optimization?
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: Building a Custom Market Regime Detection System in MQL5 (Part 2): Expert Advisor.
This article details building an adaptive Expert Advisor (MarketRegimeEA) using the regime detector from Part 1. It automatically switches trading strategies and risk parameters for trending, ranging, or volatile markets. Practical optimization, transition handling, and a multi-timeframe indicator are included.
In Part 1 of this series, we laid the essential groundwork for tackling the challenge of ever-changing market dynamics. We established a robust statistical foundation, constructed a CMarketRegimeDetector class capable of objectively classifying market behavior, and developed a custom indicator ( MarketRegimeIndicator ) to visualize these regimes directly on our charts. We moved from recognizing the problem – the performance degradation of static strategies in dynamic markets – to developing a system that can identify the prevailing market state: Trending (Up/Down), Ranging, or Volatile (Link Part 1 for Reference).
However, merely identifying the current regime is only half the battle. The true power lies in adapting our trading approach based on this knowledge. A detector, no matter how sophisticated, remains an analytical tool until its insights are translated into actionable trading decisions. What if our trading system could automatically switch gears, deploying trend-following logic when trends are strong, shifting to mean-reversion tactics in sideways markets, and adjusting risk parameters when volatility spikes?
The backtest utilizing the optimized parameters demonstrates a marked improvement, showing a positive net profit and a more favorable equity curve compared to the initial run.
Author: Sahil Bagdi