Skip to content
All library documents

CCI Threshold Signals and a Short EURUSD Backtest

Article MQL5 code base

Summary

This document describes a function that turns Commodity Channel Index readings into directional signals for an expert advisor: one return value indicates a buy and another a sell. Its configurable inputs include the CCI averaging period, applied price, buffer shift, and upper and lower thresholds. The document also reports a historical EURUSD test on 15-minute bars using specified CCI settings and fixed take-profit, stop-loss, and lot parameters.

The reported run contains 53 trades and shows positive net profit, a profit factor above one, and a maximum drawdown of 10.25%. Long and short outcomes differ, with the short positions having a higher winning percentage in this sample. These results describe only a brief historical period, and the report notes many mismatched chart errors and unavailable modeling-quality data. It gives no out-of-sample validation, transaction-cost discussion, or evidence that the settings generalize, so the figures should not be treated as proof of durable performance.

Key ideas

  • The function maps CCI readings to buy and sell signals using configurable thresholds.
  • The signal calculation can use a chosen price input, period, and indicator-buffer shift.
  • A historical EURUSD test reports 53 trades and a maximum drawdown of 10.25%.
  • The test has mismatched chart errors and no available modeling-quality rating.
  • The short test period and lack of validation limit conclusions about future performance.

Tags

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