A Bollinger %B Strategy with Martingale Position Increases
Summary
This Pine Script example combines Bollinger Band %B signals with a martingale-style position increase. It calculates %B from a moving average and standard deviation bands, enters long when %B crosses above zero, and enters short when it crosses below one. With the martingale option enabled, it adds to an existing position after price moves against it by a stated percentage. The script also defines profit-taking exits relative to average position price.
The document provides code but no backtest, performance evidence, or risk analysis. Its position increases can magnify losses, and the shown conditions and order parameters may not behave as intended in the platform; the snippet should be checked before use. It does not establish that the signals or exits are profitable, and it gives no guidance on leverage, maximum exposure, or drawdown control.
Key ideas
- The script uses Bollinger %B crossings of zero and one as long and short entry signals.
- An optional martingale setting increases an existing position after an adverse price move.
- Profit-taking levels are defined as percentages of the average position price.
- The document supplies no performance evidence, and the position sizing approach can increase exposure during losses.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.