Testing and Customizing a Candlestick and Stochastic MQL5 Expert Advisor
Summary
This guide demonstrates how to inspect, test, and modify MetaTrader 5’s BullishBearish MeetingLines Stoch Expert Advisor. The default program looks for Three Black Crows and Three White Soldiers patterns, then confirms them with Stochastic readings. The author outlines baseline testing and parameter tuning, and shows code changes that make the overbought and oversold thresholds configurable and add a moving-average trend filter.
The reported EURUSD H1 tests compare default settings with manual Stochastic variations and configurations using the new filter. One variation improved the reported loss, profit factor, and losing streak relative to the default, while other settings reversed much of that improvement. Tighter filters reduced trading activity, and some configurations approached breakeven, but had few trades. The results are specific to the tested period, demo environment, spread, and commission assumptions; the article warns that optimization can overfit and recommends checking settings on separate data and across execution conditions.
Key ideas
- The built-in EA combines three-candle reversal patterns with Stochastic confirmation.
- A baseline Strategy Tester run provides a comparison point for later changes.
- Exposing fixed Stochastic thresholds as inputs makes them available for systematic testing.
- A moving-average filter can restrict entries to the direction of the broader trend.
- The reported tests are exploratory and require out-of-sample validation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.