Directional Bollinger Bands

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Directional Bollinger Bands

Postby Apprentice » Tue Apr 01, 2025 12:03 pm

EURUSD D1 (04-01-2025 1900).png

What are Directional Bollinger Bands?
Directional Bollinger Bands are a variation of the standard Bollinger Bands indicator. While classic Bollinger Bands consist of a moving average (central line) with bands placed a certain number of standard deviations above and below this moving average, the Directional Bollinger Bands adapt dynamically according to the current price direction.
How Directional Bollinger Bands Work:
Calculation Basis:

Uses a moving average (default 20 periods).

Bands are placed at a distance determined by a certain number of standard deviations from this moving average (default is 2 deviations).

Directional Adjustment:
The bands dynamically adjust based on the price’s direction:

Bullish Direction (price is above moving average):
The top line (TL) is calculated as the moving average plus 2 standard deviations.
The bottom line (BL) adjusts upward following price movement (trailing).

Bearish Direction (price is below moving average):
The bottom line (BL) is calculated as the moving average minus 2 standard deviations.
The top line (TL) adjusts downward following price movement (trailing).

Line Breaks (Gaps):
When the price crosses above or below the moving average, the bands briefly reset, creating breaks or gaps in the lines.
Directional Bollinger Bands.lua
(7.59 KiB) Downloaded 308 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38821
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 110 guests