Asking for Feedback on AI-Generated Trading Strategy

  • Thread starter Thread starter HB123
  • Start date Start date
  • Watchers Watchers 2

HB123

Newbie
Messages
6
Likes
2
I was wondering if people could give me their opinions/feedback on the AI generated strategy that I created. If you have suggestions on how to improve it that would be great.

Strategy overview

Trade the trend and reversals around validated support/resistance levels, only when volume and MACD confirm momentum. Use ATR for stop sizing and fixed risk-per-trade position sizing.




Parameters (recommended starting values)​


  • Timeframe: 1H or 4H for swing/intraday, Daily for swing/position trading. (Pick one and be consistent.)
  • Support / Resistance detection: recent swing highs/lows (lookback 20 bars) or pivot highs/lows (3-bar pivot).
  • MACD: Fast EMA = 12, Slow EMA = 26, Signal SMA = 9 (standard). Optionally try 8,17,9 for faster signals.
  • Volume filter: Volume > 1.2 × 20-period average volume at time of signal (adjust multiplier).
  • ATR: 14-period ATR for stop placement.
  • Risk per trade: 1% of account equity (conservative). Max simultaneous risk: 3% (adjust).
  • Reward:Risk target: initial target 2× ATR (or fixed reward:risk 2:1). Consider partial profit-taking.
  • Max trades per day/week: 1–2 (avoid overtrading).



Entry logic (long)​


Enter a long when all conditions occur at the same time:


  1. Price at / near support
    • Price tests a clearly defined support level (previous swing low / pivot within last 20 bars). "Near" = within 0.5–1.5 ATR of the support.
  2. Price action confirmation
    • A bullish price pattern on that test: bullish engulfing, hammer, or a clean rejection candle (long lower wick) closing above the low of the test candle.
  3. Volume confirmation
    • The candle that shows the rejection or the breakout off support has volume ≥ 1.2 × 20-period average volume.
  4. MACD confirming bullish momentum (one of):
    • MACD histogram turning up from negative toward zero (momentum increasing), OR
    • MACD line crossing above signal line within the last 3 bars, OR
    • MACD is positive and rising (for trend-confirmation).
  5. Trend filter (optional but recommended)
    • 50-period EMA below price (for longs) — i.e., trade with the higher time-frame trend. For larger timeframes you can use 200 EMA.

Enter on the close of the confirmation candle (or on a small follow-up pullback if you prefer a better price).


Entry logic (short)​


Same but inverted:


  1. Price at/near resistance (within 0.5–1.5 ATR).
  2. Bearish rejection candle: shooting star, bearish engulfing, long upper wick.
  3. Volume ≥ 1.2 × 20-period avg on rejection.
  4. MACD: histogram turning down from positive, or MACD line crossing below signal within last 3 bars, or MACD negative and falling.
  5. Trend filter: 50 EMA above price (for shorts).



Stop-loss and position sizing​


  • Stop-loss:
    • Place stop beyond the swing high/low used as S/R plus a buffer = 0.5 × ATR (i.e., Stop = S/R ± 0.5 ATR).
    • Alternatively use 1.0 × ATR beyond the candle high/low for extra safety.
  • Position sizing:
    • Risk per trade = Account Equity × Risk% (e.g., 1%).
    • Position size (units) = (Risk per trade in currency) / (Stop distance in price × contract multiplier if futures).
    • Example: $100k account, 1% risk = $1,000. Stop distance = $0.50 -> size = 2000 shares.



Take-profit and trade management​


  • Primary target: 2 × ATR from entry OR next proximate resistance (for longs) as an exit; for shorts target next support.
  • Partial take-profit: take 50% at 1× ATR, move stop to breakeven, let remainder run to 2–3× ATR or trailing using ATR.
  • Trail stop: move stop to entry +0.5 ATR (after 1× ATR achieved) and then trail by 0.75 × ATR behind price.
  • Time stop: if trade not reached 1× ATR in X bars (e.g., 10 bars on 1H), consider reducing size or exiting — avoids capital tie-up.



Filters / avoidance rules​


  • Do NOT take trades during high-impact news (e.g., central bank, CPI) unless you have explicit event strategy.
  • Avoid trading within 15–30 minutes of session open for high-volatility markets unless backtested for that.
  • Avoid trades where S/R level is ambiguous (clustered levels) — require clear high/low pivot.
  • If MACD and price/volume conflict (e.g., bullish price/volume rejection but MACD strongly bearish), skip trade unless MACD shows divergence or turning histogram.



Example trade (step-by-step)​


  1. Instrument: EURUSD 4H. Account $50,000, risk 1% = $500.
  2. ATR(14) = 0.0020 (20 pips). Support at 1.0800 (swing low).
  3. Price drops to 1.0804 (within 0.5 ATR = 10 pips). Candle shows long lower wick and closes 1.0810.
  4. Volume on that candle = 1.5 × 20-period avg -> passes filter.
  5. MACD histogram turns up and MACD line crossed signal within last bar.
  6. Entry: market on close 1.0810. Stop = 1.0800 - 0.5×ATR = 1.0790 (stop distance 20 pips -> $500 risk → position size defined accordingly).
  7. Target: 2×ATR = 40 pips → target 1.0850. Partial 50% at +20 pips, trail rest.



Backtesting & evaluation checklist​


  • Dataset: at least 3 years of historical high-quality data (same timeframe).
  • Execute rules exactly (don’t eyeball). Include bar-by-bar logic: entry on close, stop placement, size calc.
  • Metrics to record: CAGR, Sharpe, Max drawdown, Win rate, Avg win/loss, Profit factor, Expectancy (E = Win% × avgWin − Loss% × avgLoss).
  • Sensitivity tests: vary MACD params (12,26,9 vs 8,17,9), volume multiplier (1.0–1.5), ATR multiplier (0.5–1.5).
  • Walk-forward test and out-of-sample test (e.g., 70/30 split).
  • Transaction costs & slippage: include commissions and realistic slippage per instrument.



Pseudocode / logical flow​


  1. Compute S/R levels (last 20 bars swing highs/lows).
  2. Compute ATR(14), MACD(12,26,9), volume avg(20).
  3. For each new bar:
    • If price within proximity of S or R (<= 1.5 ATR):
      • Check rejection candle (pattern or wick) at that level.
      • Check volume >= 1.2 × vol_avg.
      • Check MACD condition.
      • If all true -> calculate stop, position size -> enter.
    • Manage existing trades: partial take, move stop to breakeven, trail by ATR multiples, exit on stop or target.



Edge cases & FAQs​


  • Q: What if S/R breaks with high volume?
    A: That’s a breakout, not a rejection. You can trade breakouts only if volume > 1.5× avg and MACD confirms momentum in breakout direction; place stop below breakout retest or below breakout candle low/high.
  • Q: When MACD lags?
    A: MACD is a momentum confirmation — if price+volume show strong setup but MACD is slightly lagging (histogram rising from extreme), you may wait one bar for MACD cross OR accept the trade with reduced size.
  • Q: Do I use horizontal S/R or zones?
    A: Use zones (±0.5–1.5 ATR) instead of single price points for robustness.



How to improve the edge (advanced ideas)​


  • Add volume profile or VWAP to refine intraday support/resistance.
  • Combine MACD with RSI divergence for stronger momentum confirmation.
  • Use multi-timeframe confirmation: look for support on higher timeframe (e.g., daily) while executing on 4H.
  • Machine-optimize parameters (grid search) but avoid overfitting: prefer broad robust ranges.



Quick checklist before taking a trade​


  • Clear S/R level identified (with zone).
  • Rejection candle or breakout confirmed.
  • Volume ≥ 1.2 × 20-period avg.
  • MACD condition satisfied.
  • Stop and position size calculated (≤ 1% risk).
  • No high-impact news in the immediate window.
  • Trade fits the higher time-frame trend (if using trend filter).


 
Hello, you’ll need to code the strategy first and then run a backtest. After that, share the results so we can review whether it’s consistent in the long term, what kind of improvements it might need, which conditions to add, and how to optimize the parameters...
The strategy overview looks fine even the simplest strategies can be profitable if properly optimized. However, don’t forget that quantitative analysis can give you a deeper understanding of the target market including its volatility, volume behavior, bullish and bearish periods, and liquidity which is essential for improving and validating any trading system.
 
Back
Top