ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 2.9 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.tradingview.com/support/solutions/43000599826-bollinger-bands-strategy-directed/ |
| Last Crawled | 2026-01-28 04:20:18 (2 months ago) |
| First Indexed | not set |
| HTTP Status Code | 200 |
| Content | |
| Meta Title | Bollinger Bands Strategy Directed — TradingView |
| Meta Description | Definition"Strategy Direction" specifies what types of orders the strategy is allowed to create. If the setting value is 0, it can be both long and sh... |
| Meta Canonical | null |
| Boilerpipe Text | Definition
"Strategy Direction" specifies what types of orders the strategy is allowed to create. If the setting value is 0, it can be both long and short. If the setting is -1 it can only short and if it’s 1 it can only go long. The Bollinger Bands Strategy Direction enters long when the symbol crosses below the lower band of the Bollinger bands and it enters short if the symbol crosses above the upper band. But remember, in the strategy settings you can adjust the direction to be only long, only short or both.
Calculations
Pine Script
//@version=5
strategy("Bollinger Bands Strategy directed", overlay=true)
source = close
length = input.int(20, minval=1)
mult = input.float(2.0, minval=0.001, maxval=50)
direction = input.int(0, title = "Strategy Direction", minval=-1, maxval=1)
strategy.risk.allow_entry_in(direction == 0 ? strategy.direction.all : (direction < 0 ? strategy.direction.short : strategy.direction.long))
basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)
upper = basis + dev
lower = basis - dev
if (ta.crossover(source, lower))
strategy.entry("BBandLE", strategy.long, stop=lower, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandLE")
else
strategy.cancel(id="BBandLE")
if (ta.crossunder(source, upper))
strategy.entry("BBandSE", strategy.short, stop=upper, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandSE")
else
strategy.cancel(id="BBandSE")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
Summary
The Bollinger Bands Strategy Directed was created to buy or sell when a symbol is potentially overextended from its average price. For example, the strategy can be directed to buy if a symbol falls below its lower Bollinger Band or sell if it goes above its upper Bollinger Band. Some traders might view this as mean reversion because Bollinger Bands are created using a standard deviation of a symbols average price. Remember, the strategy is directed and in the settings you can control the value i.e. if it’s 0 it will be both long and short. If the setting is -1 it can only short and if it’s 1 it can only go long. |
| Markdown | Search
- [Products](https://www.tradingview.com/chart/)
- [Community](https://www.tradingview.com/ideas/)
- [Markets](https://www.tradingview.com/markets/)
- [Brokers](https://www.tradingview.com/brokers/)
- [More](https://www.tradingview.com/support/)
EN
![]()
[Get started](https://www.tradingview.com/pricing/?source=header_go_pro_button&feature=start_free_trial)
- [Help Center](https://www.tradingview.com/)
- /[Knowledge base](https://www.tradingview.com/knowledge-base/)
- /
Strategies
- /[Built-in Strategies](https://www.tradingview.com/support/folders/43000587406-built-in-strategies/)
- /[Bollinger Bands Strategy Directed](https://www.tradingview.com/support/solutions/43000599826-bollinger-bands-strategy-directed/)
# Bollinger Bands Strategy Directed
#### Definition
"Strategy Direction" specifies what types of orders the strategy is allowed to create. If the setting value is 0, it can be both long and short. If the setting is -1 it can only short and if it’s 1 it can only go long. The Bollinger Bands Strategy Direction enters long when the symbol crosses below the lower band of the Bollinger bands and it enters short if the symbol crosses above the upper band. But remember, in the strategy settings you can adjust the direction to be only long, only short or both.
#### Calculations
##### Pine Script
```
//@version=5
strategy("Bollinger Bands Strategy directed", overlay=true)
source = close
length = input.int(20, minval=1)
mult = input.float(2.0, minval=0.001, maxval=50)
direction = input.int(0, title = "Strategy Direction", minval=-1, maxval=1)
strategy.risk.allow_entry_in(direction == 0 ? strategy.direction.all : (direction < 0 ? strategy.direction.short : strategy.direction.long))
basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)
upper = basis + dev
lower = basis - dev
if (ta.crossover(source, lower))
strategy.entry("BBandLE", strategy.long, stop=lower, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandLE")
else
strategy.cancel(id="BBandLE")
if (ta.crossunder(source, upper))
strategy.entry("BBandSE", strategy.short, stop=upper, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandSE")
else
strategy.cancel(id="BBandSE")
//plot(strategy.equity, title="equity", color=color.red, linewidth=2, style=plot.style_areabr)
```
#### Summary
The Bollinger Bands Strategy Directed was created to buy or sell when a symbol is potentially overextended from its average price. For example, the strategy can be directed to buy if a symbol falls below its lower Bollinger Band or sell if it goes above its upper Bollinger Band. Some traders might view this as mean reversion because Bollinger Bands are created using a standard deviation of a symbols average price. Remember, the strategy is directed and in the settings you can control the value i.e. if it’s 0 it will be both long and short. If the setting is -1 it can only short and if it’s 1 it can only go long.
PreviousPrevious
Bollinger Bands Strategy
NextNext
Channel BreakOut Strategy
Launch Supercharts
***
EnglishEnglish
Select market data provided by [ICE Data Services](https://www.theice.com/market-data). Select reference data provided by FactSet. Copyright © 2026 FactSet Research Systems Inc.Copyright © 2026, American Bankers Association. CUSIP Database provided by FactSet Research Systems Inc. All rights reserved. SEC fillings and other documents provided by [Quartr](https://www.quartr.com/).© 2026 TradingView, Inc.
More than a product
- [Supercharts](https://www.tradingview.com/chart/)
Screeners
- [Stocks](https://www.tradingview.com/screener/)
- [ETFs](https://www.tradingview.com/etf-screener/)
- [Bonds](https://www.tradingview.com/bond-screener/)
- [Crypto coins](https://www.tradingview.com/crypto-coins-screener/)
- [CEX pairs](https://www.tradingview.com/cex-screener/)
- [DEX pairs](https://www.tradingview.com/dex-screener/)
- [Pine](https://www.tradingview.com/pine-screener/)
Heatmaps
- [Stocks](https://www.tradingview.com/heatmap/stock/)
- [ETFs](https://www.tradingview.com/heatmap/etf/)
- [Crypto coins](https://www.tradingview.com/heatmap/crypto/)
Calendars
- [Economic](https://www.tradingview.com/economic-calendar/)
- [Earnings](https://www.tradingview.com/earnings-calendar/)
- [Dividends](https://www.tradingview.com/dividend-calendar/)
More products
- [Yield Curves](https://www.tradingview.com/yield-curves/)
- [Options](https://www.tradingview.com/options/)
- [News Flow](https://www.tradingview.com/news-flow/)
- [Pine Script®](https://www.tradingview.com/pine-script-docs/)
Apps
- [Mobile](https://www.tradingview.com/mobile/)
- [Desktop](https://www.tradingview.com/desktop/)
Community
- [Social network](https://www.tradingview.com/social-network/)
- [Wall of Love](https://www.tradingview.com/wall-of-love/)
- [Refer a friend](https://www.tradingview.com/share-your-love/?source=footer&feature=refer_friend)
- [House Rules](https://www.tradingview.com/house-rules/)
- [Moderators](https://www.tradingview.com/moderators/)
Ideas
- [Trading](https://www.tradingview.com/ideas/)
- [Education](https://www.tradingview.com/ideas/?type=education)
- [Editors' picks](https://www.tradingview.com/ideas/editors-picks/)
Pine Script
- [Indicators & strategies](https://www.tradingview.com/scripts/)
- [Wizards](https://www.tradingview.com/pine-wizards/)
- [Freelancers](https://www.tradingview.com/pine-script-freelancers/)
Tools & subscriptions
- [Features](https://www.tradingview.com/features/)
- [Pricing](https://www.tradingview.com/pricing/?source=footer&feature=pricing)
- [Market data](https://www.tradingview.com/data-coverage/)
- [Gift plans](https://www.tradingview.com/gifts/)
Trading
- [Overview](https://www.tradingview.com/trading/)
- [Brokers](https://www.tradingview.com/brokers/)
Special offers
- [CME Group futures](https://www.tradingview.com/cme/)
- [Eurex futures](https://www.tradingview.com/eurex/)
- [US stocks bundle](https://www.tradingview.com/us-markets-bundle/)
About company
- [Who we are](https://www.tradingview.com/about/)
- [Space mission](https://www.tradingview.com/space-mission/)
- [Blog](https://www.tradingview.com/blog/en/)
- [Careers](https://www.tradingview.com/careers/)
- [Media kit](https://www.tradingview.com/media-kit/)
Merch
- [TradingView store](https://tradingviewstore.com/)
- [Tarot cards for traders](https://www.tradingview.com/tarot-reading/)
- [The C63 TradeTime](https://www.tradingview.com/tradetime/)
Policies & security
- [Terms of Use](https://www.tradingview.com/policies/)
- [Disclaimer](https://www.tradingview.com/disclaimer/)
- [Privacy Policy](https://www.tradingview.com/privacy-policy/)
- [Cookies Policy](https://www.tradingview.com/cookies-policy/)
- [Accessibility Statement](https://www.tradingview.com/accessibility/)
- [Security tips](https://www.tradingview.com/security/)
- [Bug Bounty program](https://www.tradingview.com/bounty/)
- [Status page](https://status.tradingview.com/)
Business solutions
- [Widgets](https://www.tradingview.com/widget/)
- [Charting libraries](https://www.tradingview.com/free-charting-libraries/)
- [Lightweight Charts™](https://www.tradingview.com/lightweight-charts/)
- [Advanced Charts](https://www.tradingview.com/advanced-charts/)
- [Trading Platform](https://www.tradingview.com/trading-platform/)
Growth opportunities
- [Advertising](https://www.tradingview.com/advertising-info/)
- [Brokerage integration](https://www.tradingview.com/brokerage-integration/)
- [Partner program](https://www.tradingview.com/partner-program/)
- [Education program](https://www.tradingview.com/students/)
Community
- [Social network](https://www.tradingview.com/social-network/)
- [Wall of Love](https://www.tradingview.com/wall-of-love/)
- [Refer a friend](https://www.tradingview.com/share-your-love/?source=footer&feature=refer_friend)
- [House Rules](https://www.tradingview.com/house-rules/)
- [Moderators](https://www.tradingview.com/moderators/)
Ideas
- [Trading](https://www.tradingview.com/ideas/)
- [Education](https://www.tradingview.com/ideas/?type=education)
- [Editors' picks](https://www.tradingview.com/ideas/editors-picks/)
Pine Script
- [Indicators & strategies](https://www.tradingview.com/scripts/)
- [Wizards](https://www.tradingview.com/pine-wizards/)
- [Freelancers](https://www.tradingview.com/pine-script-freelancers/)
Business solutions
- [Widgets](https://www.tradingview.com/widget/)
- [Charting libraries](https://www.tradingview.com/free-charting-libraries/)
- [Lightweight Charts™](https://www.tradingview.com/lightweight-charts/)
- [Advanced Charts](https://www.tradingview.com/advanced-charts/)
- [Trading Platform](https://www.tradingview.com/trading-platform/)
Growth opportunities
- [Advertising](https://www.tradingview.com/advertising-info/)
- [Brokerage integration](https://www.tradingview.com/brokerage-integration/)
- [Partner program](https://www.tradingview.com/partner-program/)
- [Education program](https://www.tradingview.com/students/)
 |
| Readable Markdown | null |
| ML Classification | |
| ML Categories | null |
| ML Page Types | null |
| ML Intent Types | null |
| Content Metadata | |
| Language | en |
| Author | null |
| Publish Time | not set |
| Original Publish Time | 2020-11-17 15:14:48 (5 years ago) |
| Republished | No |
| Word Count (Total) | 589 |
| Word Count (Content) | 300 |
| Links | |
| External Links | 16 |
| Internal Links | 73 |
| Technical SEO | |
| Meta Nofollow | No |
| Meta Noarchive | No |
| JS Rendered | No |
| Redirect Target | null |
| Performance | |
| Download Time (ms) | 238 |
| TTFB (ms) | 199 |
| Download Size (bytes) | 107,353 |
| Shard | 78 (laksa) |
| Root Hash | 6550570140545720678 |
| Unparsed URL | com,tradingview!www,/support/solutions/43000599826-bollinger-bands-strategy-directed/ s443 |