Author of the idea is Andrey, the author of the MQL5 code is barabashkakvn.
The Expert Advisor trades based on signals generated by Stochastic Oscillator. Averaging. A limited number of positions. Trailing.
Inputs:
- Lots
- Take Profit
- Stop Loss (in pips)
- Trailing Stop (in pips) (if “0” the parameter is off)
- Max Positions (if “0” the parameter is off)
- Gap
- K-period (number of bars for calculations)
- D-period (period of first smoothing)
- final smoothing
- zoneBUY
- zoneSELL
A Sell position is opened when the main Stochastic line is below the signal Stochastic line on the bar with index “1”, while the signal line of the Stochastic oscillator is above “zoneSELL”: