Skip to content
All library documents

Stochastic Oscillator Expert Advisor with Averaging and Position Limits

Article MQL5 code base

Summary

This Expert Advisor uses Stochastic Oscillator signals to open trades and includes averaging, a configurable cap on open positions, and optional trailing stops. Its inputs cover trade size, take-profit and stop-loss distances, trailing distance, maximum positions, a gap parameter, oscillator periods and smoothing, and buy and sell zones. The stated sell condition uses the prior completed bar: the main Stochastic line is below its signal line while the signal line is above the configured sell zone.

The description gives only the sell-side trigger and does not spell out the buy rule, averaging schedule, or how the gap parameter affects orders. It provides no backtest or live-performance evidence and does not explain risk controls beyond the configurable trade exits and position limit. Because averaging can add exposure as positions accumulate, the settings and missing implementation details matter when assessing risk; the brief overview alone is not enough to reproduce or evaluate the system.

Key ideas

  • The EA generates trades from Stochastic Oscillator signals and includes position averaging.
  • A maximum-position input can limit the number of simultaneous trades.
  • Trailing stops can be enabled by setting a trailing distance.
  • The stated sell trigger compares the main and signal lines on the previous bar and checks a sell-zone threshold.
  • The buy rule and performance evidence are not described.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.