OPEN-SOURCE SCRIPT
Atualizado

[blackcat] L2 Center Band Bollinger

4 368
Level: 2

Background

Bollinger bands are a type of price envelope developed by John Bollinger , where price envelopes define upper and lower price ranges. Bollinger Bands are envelopes that are represented with a standard deviation above and below a simple moving average of price. Because the spacing of the bands is based on the standard deviation, they adjust for fluctuations in the volatility of the underlying price.

Function

[blackcat] L2 Center Band Bollinger takes advantage of Bollinger band to detect sideways and trends. At the same time, I made an improvement and the center Bollinger line as a fast-slow-line color band. The algorithm of the color center band is composed of price and volume information, which produces gold cross and dead cross for short term long and short entries.

Key Signal

aa10 --> bollinger middle fast line
aa12 --> bollinger middle slow line
up --> upper envelope
dn --> lower envelope

Pros and Cons

Pros:

1. it can easy see the sections of trends or sideways by width of Bollinger band
2. long and short entries are disclosed

Cons:

1. Some noise is still incorporated in trends
2. due to this is un-optimized version, time frame and trading pairs need to be selected
3. Bollinger re-entry signal is not disclosed yet


Remarks

The long and short signal is compatible to nilux strategy backtest framework for sandardized backtest scheme: [NLX-L3] Backtest

Readme

In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.

The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.

Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.

Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.

Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.

Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.

Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Notas de Lançamento
Add backtest scheme for this indicator.
After a simple tuning on SL&TP, I found this indicator works on long much better than short, which indicate short scheme need improvements.
So, in the backtest, only long direction is demostrated. You can choose "long", "short" and "both" directions in strategy backtest settings.

#########################################################################################################

Courtesy of nilux "NLX-L3 Backtest" easy backtest framework for dummies.
Step by step backtest guide with "NLX-L3 Backtest" framework:
STEP1: Add this indicator into your chart
STEP2: Add "NLX-L3 Backtest" into your chart
STEP3: Click "Settings" gear icon of "NLX-L3 Backtest" to select "Select L2 Indicator" in the 1st line as "blackcat L2 Center Band Bollinger: backtest"
STEP4: Configure your backtest other settings under "NLX-L3 Backtest" framework
STEP5: Click "OK" and view the results in "Strategy Tester" tab
Notas de Lançamento
b]OVERVIEW
The [blackcat] L2 Center Band Bollinger script calculates and plots custom Bollinger Bands using a unique approach centered around the average of four different simple moving averages. It also includes weighted moving averages, saturation calculations, and RSI-based entry signals. The script provides visual indicators for potential buy and sell points on the chart.

FEATURES

Custom Bollinger Bands: Calculated using the average of SMAs over periods of 3, 6, 12, and 24.
Weighted Moving Averages: Utilized to smooth price data for more accurate trend identification.
Saturation Calculation: Helps determine market conditions based on trading activity and price levels.
RSI-Based Entries: Provides additional entry signals based on Relative Strength Index (RSI).
Buy/Sell Labels: Automatically places buy/sell labels on the chart at identified entry points.
HOW TO USE

Copy the script code into the Pine Script editor within TradingView.
Click on "Add to Chart" to apply the indicator to your desired chart.
Observe the plotted Bollinger Bands, center bands, and labeled buy/sell signals for analysis.
Adjust parameters like lengths and multipliers if needed to better fit specific market conditions.
LIMITATIONS

The script relies heavily on historical data accuracy and may require parameter tuning for optimal performance across different markets.
Signal reliability can be affected by sudden market volatility or unusual trading patterns.
NOTES

This script was developed to enhance trading strategies by providing comprehensive visualization tools.
Users should conduct thorough backtesting before relying solely on these signals for real-time trading decisions.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.