Skip to content
All library documents

A Laguerre and CCI Expert Advisor with Adaptive Position Sizing

Article MQL5 code base

Summary

This Expert Advisor combines a Laguerre indicator, a moving average, and the Commodity Channel Index to define buy and sell conditions. The document describes buying when Laguerre is at its lower extreme, the moving average is rising, and CCI is below a configured threshold; selling uses the opposite Laguerre and moving-average states with CCI above its threshold. Positions close when Laguerre moves toward the opposite extreme. Users can also set stop-loss and take-profit levels, or use virtual thresholds that close positions without placing broker-side orders.

Position size may be fixed or based on free margin, and a reduction factor can lower size after losing trades. The configurable inputs include indicator periods, prices, methods, thresholds, and whether signals use the forming bar or the first completed bar. The document references a strategy-tester visualization but supplies no quantified performance results. It offers rules and implementation parameters, not evidence that the system is profitable; the optional sizing and virtual exits also require careful risk evaluation.

Key ideas

  • The entry rules combine Laguerre extremes with moving-average direction and a CCI threshold.
  • Positions close when Laguerre reaches the opposite side of its range.
  • The system supports fixed sizing or sizing proportional to free margin, with optional reductions after losses.
  • Stop-loss and take-profit exits can be broker-side or handled as virtual thresholds.
  • Signal timing depends on whether indicator values are checked on a forming bar or a completed bar.

Tags

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