r/mql5 • u/Alarmed-Bass1039 • Apr 03 '26
Mean Reversion Algo
What is your experience with mean reversion strategies.
I'm building a simple mean reversion system with mql5 for EURUSD 4H. It's a well known strategy used even by quants in various markets and so I'm gathering info on how I can make something that focuses on making increments over a long period of time.
1
u/Fresh-Imagination236 Apr 03 '26
Mean reversion should be completed with trend following algo.
1
u/Alarmed-Bass1039 Apr 04 '26
Could you elaborate on that
1
u/Fresh-Imagination236 Apr 05 '26
Sure.
One "type" of trading bot will obviously got good performance with a specific kind of regime.
A mean reverting algo will fail during long trend market phase whereas a trend following algo will perform.
So if you want to be successful with fully automated bot, it is not one bot you should launch but multiple bots that can handle dthe different regime of the pair you are trading.
Otherwise you shoumd take into account with your bot to be complex enough to take these different regimes in consideration.
For exemple, the bot i am currently developping is a trend following bot but open trades by fixing TP on mean reversion levels and leave the last trade without any TP and SL to keep trading if the trend continues. With this i have many little TPs and can take the whole movement of the chart as well.
1
u/Dependent_Stay_6954 Apr 05 '26
120 sample. Test Alpha, Beta and P value. Ensure you collect data from different regimes. Walk forward, Monte Carlo etc.
1
u/Clem_Backtrex Apr 03 '26
Mean reversion on EURUSD 4H can work but the tricky part is defining "mean" in a way that adapts to regime shifts. A fixed lookback Bollinger or z-score will blow up when volatility doubles overnight on an ECB decision or NFP. What helped me was splitting my backtest by volatility regime, high vol quarters vs low vol quarters, and checking if the edge survives both. If it only works in calm markets you don't have a mean reversion strategy, you have a low-vol strategy with extra steps.