Indicator · Pine Script v4 · On the chart

Bollinger Awesome Alert R1.1 by JustUncleL

by theonetrade

Bollinger Awesome Alert R1.1 is a price chart overlay indicator designed for scalping setup identification.

View on GitHub

GitHub stars34on the repository
Pine versionv4older, still runs
Lines of code168
Settings11inputs
LicenceMIT
Last update2 weeks ago8 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

168 lines of Pine Script v4 from assets/indicator/bit-exact/bollinger_awesome_alert_r1_by_justunclel_QYCToBoN.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

bollinger_awesome_alert_r1_by_justunclel_QYCToBoN.pine
//@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.

Details

Published by

theonetrade on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Markets

Forex

Timeframes

M1-M5, M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingbacktestingbitcoinccxtcrypto-tradingllm-agentoffline-backtestingopen-source-tradingpine-scriptpine-to-pythonpinescriptpynecorepythonquantquantitative-financestrategy-backtestingtechnical-analysistrading-indicatorstrading-strategiestradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Use EMA for Bollinger Bandboolfalsebb_use_ema
Filter Buy/Sell with Bollinger Bandsboolfalsebb_filter
Flter Buy/Sell with BB squeezeboolfalsesqz_filter
Bollinger Lengthint20bb_length
Bollinger Sourcesourceclosebb_source
Base Multiplierfloat2.0bb_mult
Fast EMA lengthint3fast_ma_len
Awesome Length Slowint34nLengthSlow
Awesome Length Fastint5nLengthFast
BB Relative Squeeze Lengthint100sqz_length
BB Squeeze Threshold %int50sqz_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.

Similar Pine Scripts

114 stars

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

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of ADX Strategy (original)
57 stars

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

Indicator v5 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Double Screened Decision
24 stars

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

Indicator v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bollinger Band Swing

Index Intraday Analyst

by chris-c-thomas
13 stars

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

Indicator v6 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of Index Intraday Analyst

RePaNoCHa V4

by wocclyl
9 stars

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

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers