Skip to content
All library documents

Bollinger Band Position Trading with Reversal of Opposite Positions

Article MQL5 code base

Summary

This document outlines operational rules for an automated strategy associated with Bollinger Bands, although it does not specify the precise band conditions that trigger a buy or sell. The system evaluates signals on a new bar and allows the number of open positions to grow without a stated limit. When it receives a buy signal, it closes all sell positions; a sell signal closes all buys. Before placing an order, it checks whether the account has enough funds for twice the lot size.

The note describes implementation behavior rather than a complete, assessable strategy. It gives no entry thresholds, exit logic beyond closing opposite-side positions, lot-sizing method, stop rules, market or timeframe, backtest, or live performance evidence. The unlimited position count and funding check do not by themselves define exposure controls, so the document is insufficient to assess risk or expected returns. The original idea is attributed to a discussion participant, while the code authorship is credited separately.

Key ideas

  • The strategy checks for signals only when a new bar begins.
  • A buy signal closes all open sell positions, and a sell signal closes all open buy positions.
  • The rules permit an unlimited number of positions in the same direction.
  • An order is opened only after checking funds against a double-lot requirement.
  • The document does not provide the Bollinger Band signal conditions or performance evidence.

Tags

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