DrCryptoLandy

Bollinger Band PW Package

DrCryptoLandy Telah dikemas kini   
This script creates a Bollinger Band Package with Bollinger Band Percent and Width displayed on chart. The indicator also prints signals when price closes above or below the Bollinger Bands using shapes (circles by default). Bollinger Bands were created by John Bollinger, and consist of three lines plotted on a chart: the basis line (typically a moving average, 20 sma by default), an upper line (equal to the basis plus a certain number of standard deviations of the price, 2), and a lower line (equal to the basis minus the same number of standard deviations, 2 by default).

The script calculates the Bollinger Bands for a given input parameters by taking the length of the moving average and the number of standard deviations to use for the upper and lower bands. It then calculates the Bollinger Bands using these input parameters.

The script defines two functions: get_bb_percent() and get_bb_width(). The get_bb_percent() function calculates the percentage distance between the closing price and the lower band, as a percentage of the total distance between the upper and lower bands. This value is commonly referred to as the "Bollinger Band Percent". The get_bb_width() function calculates the percentage distance between the upper and lower bands, as a percentage of the basis line. This value is commonly referred to as the "Bollinger Band Width".

The script creates a table at the middle right of the chart, where the Bollinger Band Percent and Width values are displayed. The table is designed with two rows, one for the Bollinger Band Percent value and the other for the Bollinger Band Width value.

The script plots the three Bollinger Bands lines on the chart. The basis line is plotted in blue, the upper band line in red, and the lower band line in green.

The script then plots the shapes that signify closures above and below the bands using plotshape. The shapes and colors are customizable in the settings menu.

This indicator is designed to have all three components and a visual aid to assist Bollinger Band technical analysis in one script which can be helpful in determining potential trading opportunities. We thank John Bollinger for his contribution to technical analysis and trading.

Please give feedback and modify to your liking.
Nota Keluaran:
-Updated the table showing the BB% and BB Width with a frame, border, and background colors to make the table visible on charts with light backgrounds
-Updated the BB% table cell background to display green when % is above 50% and red when below 50%
Nota Keluaran:
-Updated table position to the top right per user request

Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?