MACD Pullback Sniper | Trend + ADX Filtered Strategy by blitz_locked

By blitz_locked

Performance Metrics

Description

MACD Pullback Sniper is a simple trend-following strategy. It uses the classic MACD signal-line cross, but only takes the crosses that line up with the larger trend. The goal is fewer trades, taken at better moments.How it worksThe strategy waits for the MACD line to cross the signal line, then checks three filters before entering:Trend filter: Longs are allowed only when price is above the 200 EMA, and shorts only when it is below.Zero-line filter: Longs must cross below the zero line and shorts above it. In an uptrend, a bullish cross below zero usually marks a pullback ending, so entries come after the dip rather than after the move.ADX filter: Trades are taken only when ADX is above the threshold (default 20). This cuts out many of the whipsaws that MACD produces in sideways markets.Exits and risk managementStop loss: ATR-based (default 2x ATR), so it adapts to volatility.Take profit: A fixed reward:risk multiple (default 2R).Optional signal exit: Closes the trade on an opposite MACD cross.Position sizing: Each trade risks a fixed percentage of current equity (default 1%). A maximum position size cap stops very tight stops from creating oversized trades.Stop and target placement: After entry, both are re-anchored to the actual fill price. The stop and target are drawn on the price chart while a trade is open.FeaturesLong and short trading, with shorts switchable offEach filter can be turned on or off independentlyCustom start and end dates for backtestingMACD histogram, MACD line and signal line in a separate paneTrend EMA, stop, target and entry markers drawn on the main chartCommission (0.05%) and slippage (2 ticks) included in the default settingsTipsUse it on trending markets and higher timeframes (1H, 4H, Daily). MACD crosses on very low timeframes are mostly noise.If you want more trades, turn off the zero-line filter first. If you want higher quality, raise the ADX minimum to 25.Check the trade count. Judge results on at least 100 trades, and be wary of any setting that looks great over only 20 or 30.Avoid over-optimizing. The defaults (12/26/9, 200 EMA, 14 ADX and ATR) are standard values, and results that hold up across nearby settings are more trustworthy.Test on several symbols and timeframes rather than one.Adjust the commission and slippage inputs to match your broker or exchange.Position sizing assumes one contract moves one currency unit per point of price, which fits crypto and stocks. For forex or futures, check the contract value and adjust sizing.For live trading, use a lower risk per trade than you think you need, and set the maximum drawdown you can accept before you start.Disclaimer: This script is for educational purposes only and is not financial advice. Backtest results do not guarantee future performance. Always test on a demo account first and trade at your own risk.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView