All indicators

MACD + BB + RSI Strategy

Sep 15, 2021

Static chart image
SignalsOscillatorsChannelsMoney ManagementMoving AveragesVolatility

The MACD + BB + RSI Strategy indicator is a comprehensive trend-following and momentum tool that combines three classic technical analysis indicators to identify high-probability entry and exit points. By filtering MACD crossovers with Relative Strength Index (RSI) levels and Bollinger Band price positioning, the script aims to capture momentum shifts while ensuring the price is not overextended.

Usage

The strategy generates buy signals when three conditions align: the MACD line crosses above the signal line, the RSI is below 50 (indicating it is not overbought), and the price is trading below the Bollinger Band baseline. This combination seeks to enter trades when momentum turns positive at a relatively low price point.

Exits occur when the RSI exceeds 70 or the closing price rises above the upper Bollinger Band, signaling a potential overextension. Users can also enable a customizable Stop Loss feature to manage risk effectively.

Details

The script integrates the following components:

  • MACD (Moving Average Convergence Divergence): Used to detect trend changes and momentum via the crossover of the fast and slow moving averages.
  • Bollinger Bands (BB): Provides a volatility-adjusted baseline (SMA) and outer bands to determine if the price is relatively high or low.
  • Relative Strength Index (RSI): Acts as a secondary momentum filter to prevent entering trades when the market is already overbought.

Settings

MACD

  • Fast Length: The period for the fast moving average.
  • Slow Length: The period for the slow moving average.
  • Signal Smoothing: The period used for the signal line.
  • Oscillator MA Type: Choose between SMA or EMA for the MACD calculation.
  • Signal Line MA Type: Choose between SMA or EMA for the signal line.

Bollinger Bands

  • Length: The lookback period for the basis line (SMA).
  • StdDev: The multiplier for the standard deviation to determine band width.

RSI

  • Length: The lookback period for the RSI calculation.

Stop Loss

  • Enable: Toggle the strategy's stop loss functionality.
  • Based on: Select between ATR-based (volatility adjusted) or a fixed Percentage-based stop loss.
  • ATR Mult / Length: Parameters for calculating the ATR trailing stop.
  • Percent: The fixed percentage distance for the stop loss.

FAQ

How do I use the MACD + BB + RSI Strategy?

Once added to your chart, the strategy will automatically plot buy and sell shapes. You can adjust the settings to fit different timeframes or assets, and enable the stop loss feature for automated risk management.

Can I change the moving average types?

Yes, the MACD section allows you to independently select SMA or EMA for both the oscillator and the signal line to better match your preferred trading style.

How can I access this tool?

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

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.