PG DMean & Price Sync ver 9.4 - Consolidated — Strategy by ipuneet
By ipuneet
Performance Metrics
- Author: ipuneet
- Symbol: NSE:BANKNIFTY251028C54500
- Timeframe: 1 hour
- Net P&L: +250,133.97 INR (+50.03%)
- Win Rate: 57.1%
- Profit Factor: 98.789
- Max Drawdown: 14,821.95 INR (2.44%)
- Total Trades: 7
Description
PG DMean & Price Sync Strategy (SD Filter)This strategy combines the momentum-oscillator properties of the Detrended Mean (DMean) with a Standard Deviation (SD) Price Filter for confirming trend direction, aiming to isolate high-conviction trades while actively managing risk.🔑 Core LogicDMean Momentum Signal: The strategy's primary engine is the DMean, which measures the percentage difference between the current closing price and a longer-term Moving Average (price_ma). It is then smoothed by a DMean Signal line (MA of the DMean).Entry Signal: A trade is triggered when the DMean line crosses above (for Long) or below (for Short) its Signal Line, but it must clear a user-defined Dead Zone Threshold to confirm momentum commitment.SD Filter Confirmation (Price Sync): A Standard Deviation Channel, based on a separate user-defined price source and period, is used to filter trades.Long Filter: Allows Long entries only when the price is trading above the lower SD band, suggesting the current price action is stronger than the recent average volatility to the downside.Short Filter: Allows Short entries only when the price is currently below the Filter Basis (SMA), confirming a bearish stance within the SD channel.🛡️ Risk & Exit ManagementPrimary Exit: All trades are exited by reverse DMean Crossover/Crossunder, meaning the position is closed when the DMean momentum reverses against the open trade (e.g., DMean crosses under the Signal to exit a Long).Hard Stop Loss (Short Trades): A mandatory percentage-based Hard Stop Loss is implemented only for short positions to protect against sudden upward price spikes, closing the trade if the loss exceeds the set percentage. (Note: This version does not include a Hard SL for Long trades).📊 Performance DashboardA custom Performance Dashboard Table is displayed at the bottom right of the chart to provide real-time, at-a-glance comparison of the strategy's equity performance versus a simple Buy & Hold over the selected backtesting date range.