All indicators

Bollinger Band and Moving Average v0.1 by JustUncleL

Jul 27, 2016

Static chart image
SignalsChannelsMoving AveragesRepainting Functionality

The Bollinger Band and Moving Average v0.1 indicator identifies high-probability mean-reversion trade setups by combining Bollinger Band breakouts with long-term trend filtering through Exponential Moving Averages (EMA).

Usage

The Usage section describes how the script can be used to identify potential market reversals. The strategy is primarily designed for intraday timeframes, such as the 5-minute chart, and focuses on two specific phases: the breakout and the retracement.

  • Breakout Identification: The script monitors for a "Mother Candle" that closes outside the Bollinger Bands. When this happens against the prevailing trend (as determined by the EMAs), a purple diamond appears above or below the bar, signaling a potential trade setup is approaching.
  • Trend Filtering: Trades are only considered if the breakout occurs in the opposite direction of the primary market trend. For a "PUT" signal, the market must be in a downtrend (Fast EMA < Slow EMA). For a "CALL" signal, the market must be in an uptrend (Fast EMA > Slow EMA).
  • Trade Execution: A trade signal (highlighted by a green "CALL" or red "PUT" triangle) is generated when a "Child Candle" forms. This candle must close in the opposite direction of the breakout candle. If the "Use Candle Size Filter" is enabled, the Child Candle must also be larger than the original breakout candle.
  • Timing: Once the Child Candle closes and the triangle appears, a trade can be initiated. For binary options or short-term scalping, the script suggests an expiry or hold time of 15 to 45 minutes depending on market volatility.

Details

The script utilizes a specific hierarchy of conditions to minimize false signals:

  1. Bollinger Basis: Standard Bollinger Bands are calculated using a Simple Moving Average (SMA) of 20 periods with a 2.0 standard deviation multiplier.
  2. Market Direction: Direction is determined by the relationship between a 180-period EMA (Fast) and a 365-period EMA (Slow). Additionally, the script checks if the Fast EMA is rising or falling over a user-defined number of candles to ensure momentum is consistent.
  3. Child Candle Logic: If the first candle after a breakout does not meet the size or direction requirements, the script checks the second candle. If neither of the two subsequent candles meets the criteria, the setup is invalidated.

This logic ensures that trades are only taken when there is evidence of strong price rejection and a return to the established trend. This script includes references to calculations by JayRogers.

Settings

Bollinger Settings

  • Bollinger Length: Sets the lookback period for the Bollinger Band SMA basis (default is 20).
  • Bollinger Multiplier: Sets the number of standard deviations for the upper and lower bands (default is 2).

Filter Settings

  • Use Candle size Filter: When enabled, the signal candle must be larger than the breakout candle to confirm strength.
  • Slow Moving Average Length: Sets the period for the long-term trend filter (default is 365).
  • Fast Moving Average Length: Sets the period for the short-term trend filter (default is 180).
  • Candles to test Market Direction: Determines how many bars the script looks back to confirm if the Fast EMA is rising or falling.

FAQ

How do I interpret the purple diamonds?
The purple diamonds are pre-warning alerts. They indicate that a candle has broken the Bollinger Band while the trend filter is active, suggesting a reversal signal may form on the next one or two candles.

Why are there no signals on my chart?
Because this indicator requires a strict confluence of Bollinger Band breakouts, specific EMA trend alignments, and candle size requirements, it generates fewer but higher-quality signals. Ensure your chart has enough historical data for the 365 EMA to calculate.

How can I access Bollinger Band and Moving Average v0.1?
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.