BB Squeeze (by Andy)

Comments and suggestions welcomed.
By working out the width of the bands (squeezing or expanding) we get a good indication of impending price movement, or a chnge in short-term trend.
If we then look at the rate of change in this width, sharper variations (such as a steep rise or fall) generally mean a breakout.
By plotting this rate of change (red line) along with an historical band width value (yellow line), we can see when they crossover, a trend becomes reality.
Although this script should honour a 120 bar moving average (to determine the general trend - ensuring we're not going long when the price is declining) this isn't working in this version. I've plotted that MA on the chart so we can choose not to go long if the trend is going in the wrong direction.
Obviously the next step is to apply the same logic to a declining trend, when the crossover happens in the opposite direction.
Comments and suggestions are welcomed!
1min chart: Bollinger days set between 10-16
15min chart: Bollinger days set between 5-10
1hr chart: Bollinger days set between 20-30
The reality is we really want our bollinger days to be as high as possible, because it results in fewer trades following larger trends. I'll do some more testing and see why the numbers give the best results and report back with the next update.
สคริปต์เฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ andrejsliepinieks โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำเตือน: โปรดอ่านคำแนะนำของเราสำหรับสคริปต์เฉพาะที่ได้รับเชิญเท่านั้น ก่อนที่จะขอสิทธิ์เข้าถึง
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์เฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ andrejsliepinieks โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำเตือน: โปรดอ่านคำแนะนำของเราสำหรับสคริปต์เฉพาะที่ได้รับเชิญเท่านั้น ก่อนที่จะขอสิทธิ์เข้าถึง