DrCryptoLandy

Bollinger Band PW Package

DrCryptoLandy Cập nhật   
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.
Phát hành các Ghi chú:
-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%
Phát hành các Ghi chú:
-Updated table position to the top right per user request

Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?