# AUDUSD Multi-timeframe trend filter 1m This strategy implements a multi-timeframe trend filter approach for AUDUSD on 1-minute candles using RandomForestClassifier. ## Overview - **Pair**: AUDUSD - **Timeframe**: 1m - **Model**: RandomForestClassifier with feature engineering focused on multi-timeframe trend analysis - **Goal**: Trend following strategy that filters signals across multiple timeframes (short, medium, long-term) ## Features Engineered 1. **Returns**: 1, 3, 6, 12 period returns 2. **ATR-normalized price action**: Range percentage, body percentage, close position 3. **Multi-timeframe trend filters**: - Short-term: 5 EMA vs 13 EMA - Medium-term: 13 EMA vs 34 EMA - Long-term: 34 EMA vs 89 EMA - Price position relative to each EMA (5, 13, 34, 89) 4. **Rolling volatility percentile** (from idea): Fast/slow volatility ratio, volatility percentile 5. **Distance from EMAs** (from idea): 20, 50, and 200 period EMAs 6. **Prior swing high and swing low distance** (from idea) 7. **Volume features**: Z-score and ratio to moving average ## Configuration See `quant.config.json` for hyperparameters: - `lookback`: 100 candles for prediction - `horizon`: 1 candle forward for labeling - `threshold`: 0.0004 (4 pips) for ATR-normalized breakout - `min_confidence`: 0.50 minimum probability for signal generation ## Usage This template follows the PyP Quant Mode contract: ```python def train(data, config): return model, metrics def predict(model, market_data, config): return {"signal": "UP|DOWN|HOLD", "confidence": 0.0, "metadata": {}} ``` ## Disclaimer Educational template only. Not financial advice. Past performance does not guarantee future results.