Optimized Auto-Detect Strategy (MA, ATR, Trend, RSI) by jontucklogic7467
By jontucklogic7467
Performance Metrics
- Author: jontucklogic7467
- Symbol: OANDA:NZDUSD
- Timeframe: 1 day
- Net P&L: +16.97 USD (+3.39%)
- Win Rate: 31.5%
- Profit Factor: 1.302
- Max Drawdown: 10.42 USD (2.01%)
- Total Trades: 143
- Sharpe Ratio: −0.975
Description
OverviewThis script is designed for traders seeking a trend-following approach that adapts to different currency pairs (e.g., EURUSD, NZDUSD, XAUUSD). It combines moving average crossovers with ATR-based stops, optional trend filters, and RSI filters to help reduce false signals and capture larger moves.Key Features1. Auto-Detect Logic - Automatically applies different moving average periods and ATR multipliers based on the symbol (e.g., XAUUSD, EURUSD, NZDUSD). - Makes it easy to switch charts without manually adjusting parameters each time.2. ATR-Based Stop - Uses the Average True Range (ATR) to set dynamic stop-loss levels, adapting to each market’s volatility.3. Optional Trend Filter - Filters out trades if price is below the 200 SMA for longs (and above for shorts), aiming to avoid choppy, range-bound markets.4. Optional RSI Filter - Only enters long if RSI is above a certain threshold (e.g., 50), or short if below another threshold, reducing entries during low momentum.5. Partial Exit & Trailing/Break-Even - Locks in partial profit at a chosen R:R (e.g., 1:1), then either trails the remaining position or moves the stop to break-even. - This helps capture additional gains if the trend extends beyond the initial target.6. Customizable Parameters - You can toggle on/off each filter (Trend, RSI) and adjust the ATR multiplier, MA periods, partial exit levels, etc. - Allows easy optimization for different pairs or timeframes.How to Use1. Add to Chart: Click “Add to chart” in the Pine Editor. 2. Configure Inputs: In the script’s settings, toggle the filters you want (Trend Filter, RSI Filter, etc.) and set your desired ATR multiplier, RSI thresholds, partial exit ratio, etc. 3. Strategy Tester: Check the performance under the “Strategy Tester” tab. Adjust parameters if needed. 4. Realistic Settings: Consider adding spreads/commissions in the “Properties” tab for more accurate backtests, especially if you trade pairs with higher spreads (like XAUUSD).DisclaimerNo Guarantee: This script does not guarantee profits. Markets are unpredictable, and results may vary with market conditions. For Educational Purposes: Always do your own research and forward testing. Past performance does not indicate future results.