OPEN-SOURCE SCRIPT

Bollinger Bands Simple Strategy

643
This is a simple Bollinger Bands mean-reversion strategy

It works like this:

BUY when price closes below the lower Bollinger Band
SELL when price closes above the upper Bollinger Band
It only opens one trade at a time because pyramiding = 0
Once a trade is open, it manages risk with:

a dynamic stop loss based on the most recent swing low/high plus an ATR buffer
a target at the Bollinger middle band (basis, the 20 SMA)
So the logic is:

long trades expect price to move back up toward the middle band
short trades expect price to move back down toward the middle band
The chart also shows:

the basis as a blue line
the upper and lower bands
an orange stop loss line
a light-green target line
BUY/SELL markers on entry
exit labels when a trade closes
One important detail: the stop loss and target are dynamic, so they update every bar while the trade is open. That means the stop can trail as price moves.

In simple terms, this strategy is trying to catch short-term reversals after price stretches too far outside the Bollinger Bands, then exit when price returns to the middle.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.