Idea by: Mikhail
MQL5 Code by: barabashkakvn.
Introducing a straightforward Martingale system designed for your trading needs. This Expert Advisor (EA) steps in when there are no open positions, using the iStochastic indicator (Stochastic Oscillator) to determine entry points.
Inputs
- Lots - the initial lot size for your first position
- Multiplicator - the factor by which your lot size increases
- Step (in pips) - the step increment
- Profit Factor (in pips) - the target profit level
- Stochastic: K-period (the number of bars used for calculations)
- Stochastic: D-period (the period for the first smoothing)
- Stochastic: Final smoothing setting
- Stochastic: Type of smoothing to apply
- Stochastic: Calculation method
- Stochastic: BUY Level - level at which you open a BUY position
- Stochastic: SELL Level - level at which you open a SELL position
- Magic Number - a unique identifier for your positions
For example, you can apply this strategy on the EUR/USD pair using the M30 timeframe.

Related Posts
- Mastering Trading Signals with MQL5 Wizard: Bullish and Bearish Engulfing Strategies
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Creating an Expert Advisor for Dark Cloud Cover and Piercing Line Patterns with CCI Confirmation
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5
- Harnessing MQL5 Wizard for Bullish and Bearish Harami Signals with CCI Confirmation