//@version=4
study(shorttitle="BBAWE", title="Bollinger Awesome Alert R1.1 by JustUncleL", overlay=true)
// Author: Lawrie Steven
// Date: 22-Apr-2017
// Revision: R1
//
// Description:
// ============
// This indicator is an implementation of the Bollinger Band and Awesome Oscillator
// scalping system.
// This technique is for those who want the most simple method that is
// very effective. It is BEST traded during the busiest trading hours,
// 3am to 12am EST NY time. This method doesn't work in sideways markets, only in
// volatile trending markets.
//
// Time Frames: 1, 5, 10, 15 ,30 min.
// Currency pairs: majors.
//
// Other Chart indicators:
// - Add Awesome Oscillator.
// - Optionally Add Squeeze Indicator.
//
// Here's the strategy:
// --------------------
// Going LONG:
// Enter a long position when the black 3 EMA has crossed up through the Bollinger red
// middle band MA. At the same time, the Awesome should be approaching or crossing
// it's zeroline, going up. Optionally Close price also must stay below the upper BB.
// This is indicated by "Buy" alert.
//
// Going SHORT:
// Enter a short position when the black 3 EMA has crossed down through the Bollinger red
// middle band MA. At the same time, the Awesome should be approaching or crossing it's
// zero line, going down. Optionally Close price also must stay above the lower BB.
// This is indicated by the "Sell" Alert.
//
// Take profit:
// 10-20 pips depending on pair or When Awesome Oscillator turns a different color.
//
// HINTS: Best trades tend to occur when price reversing bounce off outer band and
// and outside Optional Bollinger Squeeze indication.
//
// References:
// -----------
// - https://www.forexstrategiesresources.com/scalping-forex-strategies-iii/337-bollinger-bands-and-chaos-awesome-scalping-system
// - "Squeeze Momentum Indicator [LazyBear]"
//
// Modifications
// -------------
// 6-Sept-2019 :
// - Added optional extra condition that the signal candle close price must stay within the Bollinger Bands.
// This helps remove some of the oversized signal candles, these candles have a lower success probabilty.
// - Added Alarm system Alerts for BUY and SELL.
// 28-Sept-2019 :
// - Added optional BB squeeze filter. The squeeze Algo is based on the current relative width of the BB,
// it is NOT based on the LazyBear Algo.
// 08-Aug-2020
// - Converted to Pinescript V4
// 11-Aug-2020
// - Modified "alertcondition" calls to include the close placeholder, this forces the compiler to
// to recognise the as a placeholder alert and other placeholders can be accessed in the alarm
// message.
//
// === INPUTS ===
// Bollinger Bands Inputs
bb_use_ema = input(false, title="Use EMA for Bollinger Band")
bb_filter = input(false, title="Filter Buy/Sell with Bollinger Bands")
sqz_filter = input(false, title="Flter Buy/Sell with BB squeeze")
bb_length = input(20, minval=1, title="Bollinger Length")
bb_source = input(close, title="Bollinger Source")
bb_mult = input(2.0, title="Base Multiplier", minval=0.5, maxval=10)
// EMA inputs
fast_ma_len = input(3, title="Fast EMA length", minval=2)
// Awesome Inputs
nLengthSlow = input(34, minval=1, title="Awesome Length Slow")
nLengthFast = input(5, minval=1, title="Awesome Length Fast")
// === /INPUTS ===
sqz_length = input(100, "BB Relative Squeeze Length", minval=5)
sqz_threshold = input(50, "BB Squeeze Threshold %", maxval=99, step=5)
// === SERIES ===
// Breakout Indicator Inputs
ema_1 = ema(bb_source, bb_length)
sma_1 = sma(bb_source, bb_length)
bb_basis = bb_use_ema ? ema_1 : sma_1
fast_ma = ema(bb_source, fast_ma_len)
// Deviation
// * I'm sure there's a way I could write some of this cleaner, but meh.
dev = stdev(bb_source, bb_length)
bb_dev = bb_mult * dev
// Upper bands
bb_upper = bb_basis + bb_dev
// Lower Bands
bb_lower = bb_basis - bb_dev
// Calculate Awesome Oscillator
xSMA1_hl2 = sma(hl2, nLengthFast)
xSMA2_hl2 = sma(hl2, nLengthSlow)
xSMA1_SMA2 = xSMA1_hl2 - xSMA2_hl2
// Calculate direction of AO
AO = xSMA1_SMA2 >= 0 ? xSMA1_SMA2 > xSMA1_SMA2[1] ? 1 : 2 :
xSMA1_SMA2 > xSMA1_SMA2[1] ? -1 : -2
// Calculate BB spread and average spread
spread = bb_upper - bb_lower
avgspread = sma(spread, sqz_length)
// Calculate BB relative %width for Squeeze indication
bb_squeeze = spread / avgspread * 100
// Calculate Upper and Lower band painting offsets based on 50% of atr.
bb_offset = atr(14) * 0.5
bb_sqz_upper = bb_upper + bb_offset
bb_sqz_lower = bb_lower - bb_offset
// === /SERIES ===
// === PLOTTING ===
// plot BB basis
plot(bb_basis, title="Basis Line", color=color.red, transp=10, linewidth=2)
// plot BB upper and lower bands
ubi = plot(bb_upper, title="Upper Band Inner", color=color.blue, transp=10, linewidth=1)
lbi = plot(bb_lower, title="Lower Band Inner", color=color.blue, transp=10, linewidth=1)
// center BB channel fill
fill(ubi, lbi, title="Center Channel Fill", color=color.silver, transp=90)
//Indicate BB squeeze based on threshold.
usqzi = plot(bb_sqz_upper, "Hide Sqz Upper", transp=100)
lsqzi = plot(bb_sqz_lower, "Hide Sqz Lower", transp=100)
fill(ubi, usqzi, color=bb_squeeze > sqz_threshold ? color.white : color.blue, transp=50)
fill(lbi, lsqzi, color=bb_squeeze > sqz_threshold ? color.white : color.blue, transp=50)
// plot fast ma
plot(fast_ma, title="Fast EMA", color=color.black, transp=10, linewidth=2)
// Calc breakouts
break_down = crossunder(fast_ma, bb_basis) and close < bb_basis and abs(AO) == 2 and
(not bb_filter or close > bb_lower) and
(not sqz_filter or bb_squeeze > sqz_threshold)
break_up = crossover(fast_ma, bb_basis) and close > bb_basis and abs(AO) == 1 and
(not bb_filter or close < bb_upper) and
(not sqz_filter or bb_squeeze > sqz_threshold)
// Show Break Alerts
plotshape(break_down, title="Breakout Down", style=shape.arrowdown, location=location.abovebar, size=size.auto, text="Sell", color=color.red, transp=0)
plotshape(break_up, title="Breakout Up", style=shape.arrowup, location=location.belowbar, size=size.auto, text="Buy", color=color.green, transp=0)
// === /PLOTTING ===
// Send alert to TV alarm sub-system
alertcondition(break_down or break_up, title="BBAWE Alert", message="BBAWE Alert close={{close}}")
alertcondition(break_down, title="BBAWE Sell", message="SELL close={{close}}")
alertcondition(break_up, title="BBAWE Buy", message="BUY close={{close}}")
// eof
Overview
Bollinger Awesome Alert R1.1 by JustUncleL calculates Bollinger Bands, a fast exponential moving average, and an Awesome Oscillator. Buy and sell alert signals trigger when the fast EMA crosses the Bollinger middle band while the Awesome Oscillator aligns near or across its zero line. Users can enable optional filters to restrict signals when prices breach outer Bollinger Bands or during market squeezes evaluated by relative band width. Custom settings allow adjusting lengths, source prices, multipliers, and squeeze thresholds.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Use EMA for Bollinger Band
bool
false
bb_use_ema
Filter Buy/Sell with Bollinger Bands
bool
false
bb_filter
Flter Buy/Sell with BB squeeze
bool
false
sqz_filter
Bollinger Length
int
20
bb_length
Bollinger Source
source
close
bb_source
Base Multiplier
float
2.0
bb_mult
Fast EMA length
int
3
fast_ma_len
Awesome Length Slow
int
34
nLengthSlow
Awesome Length Fast
int
5
nLengthFast
BB Relative Squeeze Length
int
100
sqz_length
BB Squeeze Threshold %
int
50
sqz_threshold
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
ADX Strategy (original) is an overlay indicator that identifies trend-following trade signals using the Average Directional Index (ADX) combined with a Simple Moving Average filter. A long signal is generated when the ADX rises above a user-defined trend level
Double Screened Decision is a multi-timeframe trend and momentum indicator overlaid directly on the price chart. It dynamically selects a higher timeframe based on the active chart resolution to evaluate higher-timeframe MACD, Bollinger Bands, RSI, and Stochas
This indicator plots Bollinger Bands on the price chart alongside a baseline moving average to identify trend-aligned swing setups. It calculates trend bias by comparing the Bollinger Bands basis to a customizable moving average, such as a 200 EMA. Trade signa
Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and
RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si
This indicator plots an exponential moving average and marks momentum-based trade sessions on the price chart. It treats RSI between 45 and 55 as chop and shades the background when momentum is present. Long and short labels appear when MACD crosses its signal