Skip to content
All library documents

Bollinger Band Crossovers with Stop Orders and Alerts

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses Bollinger Bands built from a simple moving average and a standard-deviation envelope. A close crossing upward through the lower band places a long stop entry at that band; a close crossing downward through the upper band places a short stop entry there. The script cancels the corresponding pending order when its crossover condition is absent and can send alerts with the order level. The stated defaults are a 20-period band and a multiplier of 2.

Although the prose describes the approach as tracking price, its entry rules reverse direction at the outer bands, so signals can behave like mean reversion. The source gives published settings for BTC/USDT futures over a short period, but no results or trade statistics. The document itself flags false breakouts, sensitivity to parameter choices, and difficulty controlling losses. Stop or trailing-stop handling is discussed as a possible improvement, not clearly implemented in the shown source. Alerts and order behavior also depend on the execution platform and broker setup.

Key ideas

  • The bands use a moving-average basis expanded by a standard-deviation distance.
  • An upward cross of the lower band triggers a long stop order, while a downward cross of the upper band triggers a short stop order.
  • Pending entries are canceled when their associated crossover condition is no longer active.
  • The script can emit alerts containing the proposed band price.
  • The published backtest settings contain no performance results, and the source does not show a complete loss-control method.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.