All indicators

MACD Willy Strategy

Apr 30, 2022

Static chart image
SignalsOscillatorsMoney ManagementMoving Averages

The MACD Willy Strategy tool is a comprehensive trading system designed to identify trend-following entries and exits by combining momentum, trend, and volatility filters. This script aims to provide a structured approach for intraday traders and scalpers by merging Exponential Moving Averages (EMA), MACD, and a smoothed Williams %R.

Usage

The MACD Willy Strategy is primarily optimized for short-term timeframes (5m to 15m) on liquid instruments such as popular stocks. It generates signals based on a confluence of three conditions:

  • Trend Filter: Price must be above the 200 EMA for long entries or below it for short entries.
  • Momentum Filter: The MACD histogram must be positive for longs and negative for shorts, indicating bullish or bearish momentum.
  • Oscillator Filter: A smoothed Williams %R (Fast WMA vs. Slow EMA) provides the final confirmation when the fast line crosses the slow line.

The script also includes backtesting parameters such as a customizable trading window (Start/Finish dates), leverage options, and reinvestment settings to evaluate performance over specific historical periods.

Details

The strategy employs a multi-layered approach to reduce false signals:

  1. Trend Baseline: Using a 200-period EMA ensures that trades are only taken in the direction of the long-term trend.
  2. MACD Convergence: By looking at the MACD line relative to the signal line (Histogram), the script captures momentum shifts.
  3. Smoothed Williams %R: Unlike the standard Williams %R which can be noisy, this version uses two moving averages of the %R value to identify cleaner trend changes within the oscillator's range.

Settings

Trading Window

  • Start Year/Month/Day: Defines the beginning date for backtesting.
  • Finish Year/Month/Day: Defines the end date for backtesting.

Trading Options

  • Leverage: Adjusts the position size based on a leverage multiplier.
  • Reinvest profit: When enabled, a portion of the net profit is added to the initial capital for subsequent trades.
  • Reinvest percentage: The percentage of profit to be reinvested.

Moving Averages

  • EMA: Sets the length for the trend-filtering Exponential Moving Average (Default: 200).

MACD

  • Fast Length: The period for the fast moving average in the MACD calculation.
  • Slow Length: The period for the slow moving average in the MACD calculation.
  • Signal Smoothing: The period for the MACD signal line.
  • Oscillator/Signal MA Type: Allows users to choose between SMA or EMA for the MACD components.

William %R

  • William %R Length: The lookback period for the raw Williams %R calculation.
  • Smoothed %R Length: The period for the Fast WMA of the %R.
  • Slow EMA Length: The period for the Slow EMA of the %R.

FAQ

How do I access the MACD Willy Strategy?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Which timeframes are best for this strategy?

The strategy is specifically developed for scalping and intraday trading, performing most consistently on the 5-minute and 15-minute timeframes.

Can I use this for options trading?

While designed as a general strategy, the entry and exit signals can be used to identify potential momentum shifts suitable for short-term options contracts.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.