🧠 Trading Logic
This strategy is a very simple, fully mechanical long-only system built around the Commodity Channel Index (CCI) as an oversold signal, combined with volatility-based profit targets and a fixed-percentage stop loss. It looks for moments when the 18-period CCI drops below -147, which is a relatively deep oversold threshold, and then buys immediately at market. Because it only opens a new trade when no long position is currently open (cumulateorders = false and NOT LONGONMARKET), it will hold at most one long trade at a time.
Risk and exits are handled in two ways. The downside is controlled by a fixed 6.7% stop-loss from the entry price, so the maximum loss per trade is defined in percentage terms. The upside, however, is tied to market volatility: the profit target is set at 4.7 times the 20-period Average True Range (ATR). This means that in more volatile conditions the take-profit level is further away in price terms, aiming to capture larger swings, while in quieter markets the target is correspondingly closer.
From a market-conditions perspective, the logic suggests it may be better suited to instruments and timeframes where “buying the dip” after a strong oversold reading has a reasonable chance of mean-reverting. It is inherently contrarian: it steps in when CCI shows strong negative momentum (oversold) rather than following a trend. There are no additional filters for trend direction, volume, or higher timeframes, and no short-selling logic, so it’s quite bare-bones and easy to understand, but also exposed to prolonged downtrends where oversold can stay oversold. Traders might consider this code as a starting template to refine with trend filters, time-of-day constraints, or position sizing rules, depending on their own risk tolerance and preferred markets.
📊 Performance Metrics
| Metric |
Value |
Metric |
Value |
| Score (SQN) | 1.13 | Sharpe Ratio | 0.93 |
| Profit Factor | 1.28 | Max Drawdown | 18.10% |
| Ulcer Index | 0.046 | Stability (R²) | 0.944 |
| Trades | 65 | PnL ($) | 20,065 |
| Time in Market | 43.80% | MC Score | 62.0 |
📈 Backtest Context
| Instrument | DAX P (^GDAXI) |
Timeframe | 1d |
| Period | 2010-01-13 → 2026-03-03 |
Seed | 217126686 |
📉 Equity Curve

⚠️ Community-generated strategy — please read before trading
This strategy was automatically generated by a community member using
ProRealQuant, a free tool for automated strategy generation on ProRealTime. It is shared purely for educational and discussion purposes.
Past backtest results do not guarantee future performance. Always conduct your own analysis, apply sound risk management, and never trade with capital you cannot afford to lose.
💻 ProBuilder Code
// Generated ProBuilder Strategy
// Auto-generated from ProRealQuant
DEFPARAM cumulateorders=false
DEFPARAM preloadbars = 200
// Entry Condition (LONG)
IF NOT LONGONMARKET AND CCI[18] < -147 THEN
BUY AT MARKET
// Stop Loss Exit
SET STOP %LOSS (6.7)
// Take Profit Exit
SET TARGET PROFIT (4.7 * AVERAGETRUERANGE[20])
ENDIF
💬 Join the discussion! Feel free to share your own backtest results on different instruments or timeframes, suggest improvements, propose forks or parameter variations — the community learns best together.
🔧 Generated with ProRealQuant — a free community tool for automated strategy generation and backtesting on ProRealTime. Try it yourself!