🌊 Swing · Trend + momentum

Williams %R + MACD duo

Combine Williams %R (momentum extreme) with MACD (trend direction). Long when Williams %R exits oversold AND MACD is bullish; opposite for shorts. Cross-confirmation filters weak signals.

Timeframe: Daily
Indicators: Williams %R, MACD (12,26,9)

Setup

Entry

Long: Williams %R crosses back above βˆ’80 (out of oversold) AND MACD histogram is rising or turns positive. Short: Williams %R crosses back below βˆ’20 (out of overbought) AND MACD histogram is falling.

Exit

Exit longs when Williams %R reaches βˆ’20 or MACD histogram peaks and starts declining. Symmetric for shorts.

Stop-loss

Below the swing low that triggered the oversold reading (long) or above the swing high (short). Roughly 1Γ—ATR(14).

When it works

When it fails

TradingView backtest β€” 2 years on NSE:NIFTY

The in-browser chart above already simulates on 2 years of Nifty daily/hourly bars (60 days for 15-min due to a Yahoo Finance data cap). This section documents an independent second-source verification: run the exact same rules as a Pine Script on TradingView's Strategy Tester over the past 2 years of NSE:NIFTY daily bars, then compare.

SymbolNSE:NIFTY
TimeframeDaily
Period2 years

How to reproduce

  1. Open NSE:NIFTY on TradingView
  2. Switch chart interval to Daily
  3. Open the Pine Editor (bottom-left Pine Editor tab)
  4. Paste the contents of the downloaded .pine file, click Save, then Add to chart
  5. Open the Strategy Tester tab (bottom); set the date range to the last 2 years
  6. Screenshot the Performance Summary and share back β€” results table below will be populated
πŸ“Š Backtest results pending

Awaiting the TradingView Strategy Tester screenshot. Once shared, the results table (net profit, win rate, profit factor, max drawdown, Sharpe) will replace this note.

General trading rules that apply

Regardless of the specific setup, these apply to every strategy on this site:

Educational content only

Every strategy here is part of our in-house catalogue, written and calibrated for Indian markets. Past behavior does not guarantee future results. Charts run against 2-year Nifty data β€” actual results in your account will vary. Backtest, paper-trade, and size responsibly before risking real capital.