Bollinger %B Long Entries with Divergence Add-Ons
Summary
This strategy uses Bollinger Band %B, calculated from a simple moving average and standard deviation bands, to time long trades. It enters when %B crosses above zero, then closes the position when %B reaches or exceeds one, corresponding to price at or above the upper band. A bullish divergence signal compares the current close and %B with their values a configurable number of bars earlier; when price is lower, %B is higher, and %B remains below 0.2, it can trigger a larger add-on while a long position is open.
A percentage-based stop is set at entry and updated on an add-on; the script closes all positions if the close falls to that stop. A bearish divergence is plotted as a warning but does not affect orders. The document supplies code and explanatory descriptions, but no performance results or testing evidence. Its narrative includes features such as multiple add-ons and tiered stops that are not present in the supplied code, so the implemented rules should be distinguished from those descriptions.
Key ideas
- The initial long entry occurs when Bollinger %B crosses above zero.
- A bullish divergence compares price and %B against values from a configurable lookback.
- A qualifying divergence can add a larger long order while a position is open.
- The strategy exits when %B reaches one or the tracked stop is breached.
- The supplied code does not implement all features described in the accompanying narrative.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.