Beyond Tradition: L1 Dynamic Multilayer Bollinger Bands Lead the New Trend in Trading

blackcat1402
English blackcat1402.blog
6 min readMay 8, 2024

--

L1 Dynamic Multilayer Bollinger Bands (L1 DMBB) are an advanced technical analysis tool designed for the volatility of financial markets. They are based on the traditional Bollinger Bands, which consist of an upper and lower band formed by a multiple of the standard deviation from a simple moving average (SMA), but L1 DMBB provides a richer perspective on market volatility by adding additional layers such as up2 and low2. These layers are located at 2.56 standard deviations above and below the middle line, offering traders a more comprehensive insight into the market.

Today, let’s talk about L1 Dynamic Multi-Layer Bollinger Bands, the “black technology” in the financial trading industry. If you are confused by the volatility of the financial market, then L1 Dynamic Multi-Layer Bollinger Bands might become your savior. This indicator was open-sourced by this author on the TradingView community, and interested friends can try it out and view the source code:

Bollinger Bands, as defined by John Bollinger, are a technical analysis tool designed to measure market volatility and predict future price movements. The bands consist of three parts: a middle Simple Moving Average (SMA), and two outer lines, which are set at 1.382 and 2.56 standard deviations from the middle line, respectively.

### The Function of L1 Dynamic Multi-Layer Bollinger Bands

Now, let’s discuss the L1 Dynamic Multi-Layer Bollinger Bands. This is not your ordinary Bollinger Bands; it’s a high-tech, modern version with an added layer of L1 magic.

Dynamic Layer: Essentially, it is a moving average line, and of course, you can customize it to any type of moving average you believe performs better. It serves as the backbone of the Bollinger Bands, providing the foundation for our trading strategy. It is the 21-day SMA of the closing price, acting as the central nervous system of our trading operations.

Multi-Layer Structure: The L1 Dynamic Multi-Layer Bollinger Bands also calculate two additional lines, up2 and low2, which are 2.56 standard deviations above and below the middle line, respectively. These extra layers provide us with a stratified perspective on price volatility, offering a more comprehensive understanding of market dynamics.

Color Coding: Don’t forget about the color coding! The area between the upper and lower bands is filled with color according to the direction of the price trend. Green indicates an upward trend, while red signifies a downward trend, acting like our eyes guiding us through the labyrinth of trading.

### Introduction to Usage

Adding the Indicator: Click the “Add to Chart” button in the Pine-Script editor, and it’s like planting the L1 Dynamic Multi-Layer Bollinger Bands on your trading chart.

Interpreting the Bands: The middle line represents the 21-day SMA of the closing price. The upper line is 1.382 standard deviations above the middle line, and the lower line is 1.382 standard deviations below the middle line. These lines act like a safe zone within the territory of wild animals. When the price breaks through these lines, it’s akin to wild animals crossing their territory.

Multi-Layer Structure: The script also calculates two additional lines, up2 and low2, which are 2.56 standard deviations above and below the middle line, respectively. These lines are like the offspring of wild animals, providing us with a more stratified perspective on price volatility.

Color Coding: The area between the upper and lower bands is filled with color based on the direction of the price trend. Green signals an “advance” in an upward trend, while red serves as a “red alert” for a downward trend. Like our eyes, it guides us through the maze of trading.

The Power of L1 Dynamic Multi-Layer Bollinger Bands

L1 Dynamic Multi-Layer Bollinger Bands are like a supercharged trading machine. They can help you identify potential support and resistance levels, as well as provide insights into market volatility. It's like having a trading wizard by your side, always one step ahead.

But remember, like any tool, it's not infallible. It's just a tool to help you make smarter decisions. How wisely you use it and maximize its potential is up to you.

So, why wait? Go ahead, add L1 Dynamic Multi-Layer Bollinger Bands to your chart and start trading like a boss! After all, L1 Dynamic Multi-Layer Bollinger Bands are here to help you navigate the waves of the financial markets with style and grace. Happy trading!

Please note that this article is for educational purposes only and should not be the sole basis for any trading decisions. Trading involves risk, and trading stocks and other financial instruments can result in losses. Use this information at your own risk.

Source Code Analysis

The source code for this indicator is as follows, and I will provide a brief interpretation:

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ 
// © blackcat1402

//@version=5
indicator('[blackcat] L1 Dynamic Multi-Layer Bollinger Bands', shorttitle='L1 DMBB', overlay=true)

// Calculate the mid2 value as the simple moving average of the close price over a period of 21 days
mid2 = ta.sma(close, 21)

// Calculate the upper2 value as mid2 plus 1.382 times the standard deviation of the close price over a period of 21 days
upper2 = mid2 + 1.382 * ta.stdev(close, 21)

// Calculate the lower2 value as mid2 minus 1.382 times the standard deviation of the close price over a period of 21 days
lower2 = mid2 - 1.382 * ta.stdev(close, 21)

// Calculate the up2 value as mid2 plus 2.56 times the standard deviation of the close price over a period of 21 days
up2 = mid2 + 2.56 * ta.stdev(close, 21)

// Calculate the loow2 value as mid2 minus 2.56 times the standard deviation of the close price over a period of 21 days
loow2 = mid2 - 2.56 * ta.stdev(close, 21)

// Define the fill color based on whether mid2 is greater than its previous value
fillColor = mid2 > mid2[1] ? color(color.new(color.green, 80)) : color(color.new(color.red, 80))

// Plot the mid2 value with a white color
plot(mid2, color=color.new(color.white, 0))

// Fill the area between upper2 and lower2 with the defined fill color
fill(plot(upper2), plot(lower2), color=fillColor)

// Plot the upper2, up2, lower2, and loow2 values with red and blue colors respectively
plot(upper2, color=color.new(color.red, 0))
plot(up2, color=color.new(color.red, 0))
plot(lower2, color=color.new(color.blue, 0))
plot(loow2, color=color.new(color.blue, 0))

Let me interpret this code for you,

//@version=5
indicator('[blackcat] L1 Dynamic Multi-Layer Bollinger Bands', shorttitle='L1 DMBB', overlay=true)
  • This line declares the script's version and defines an indicator named 'L1 Dynamic Multi-Layer Bollinger Bands', abbreviated as 'L1 DMBB'. The overlay=true parameter indicates that this indicator will be overlaid on the price chart.
mid2 = ta.sma(close, 21)
  • Calculates mid2, which is the simple moving average (SMA) of the closing price over the past 21 days. This will serve as the middle band of the Bollinger Bands.
upper2 = mid2 + 1.382 * ta.stdev(close, 21)
  • Calculates upper2, the upper band of the Bollinger Bands, which is equal to mid2 plus 1.382 times the standard deviation of the closing price over the past 21 days.
lower2 = mid2 - 1.382 * ta.stdev(close, 21)
  • Calculates lower2, the lower band of the Bollinger Bands, which is equal to mid2 minus 1.382 times the standard deviation of the closing price over the past 21 days.
up2 = mid2 + 2.56 * ta.stdev(close, 21)
  • Calculates up2, an upper band that is further out than the conventional upper band, equal to mid2 plus 2.56 times the standard deviation of the closing price over the past 21 days.
loow2 = mid2 - 2.56 * ta.stdev(close, 21)
  • Calculates loow2, a lower band that is further out than the conventional lower band, equal to mid2 minus 2.56 times the standard deviation of the closing price over the past 21 days.
fillColor = mid2 > mid2[1] ? color(color.new(color.green, 80)) : color(color.new(color.red, 80))
  • Defines fillColor based on whether the current mid2 value is greater than the previous value. If mid2 is rising, it uses green; if it's falling, it uses red, with a transparency setting of 80.
plot(mid2, color=color.new(color.white, 0))
  • Plots the mid2 value with a white color.
fill(plot(upper2), plot(lower2), color=fillColor)
  • Fills the area between upper2 and lower2 with the defined fillColor, allowing us to visualize the midsection of the Bollinger Bands.
plot(upper2, color=color.new(color.red, 0))
plot(up2, color=color.new(color.red, 0))
plot(lower2, color=color.new(color.blue, 0))
plot(loow2, color=color.new(color.blue, 0))
  • Plots the values of upper2, up2, lower2, and loow2 respectively, with upper2 and up2 represented by red lines, and lower2 and loow2 by blue lines.

This code provides traders with a dynamic, multi-layered perspective on market volatility by calculating and plotting Bollinger Bands at different levels. The color coding and multiple layers of Bollinger Bands can assist traders in identifying market trends and potential trading opportunities.

--

--