Description Usage Indicators Signals Rules Notes References
Strategy object implementing a Bollinger Bands strategy.
1  data('stratBBands')

This strategy uses only a single indicator, comprised of the TTR function BBands
.
Parameters for this indicator include number of MA periods, and the size of the bands in standard deviations.
If constructed from scratch, the indicators would consist of:
a moving average parameterized by MA type (simple, exponential, Kalman, etc.) and MA periods to smooth over
the upper band constructed classically by standard deviations from the moving average, or alternately by some other upper band generating function, and parameterized chiefly by the amplitude of the band, typically number of standard deviations from the midpoint or moving average indicator
the lower band traditionally constructed to be symmetrical and opposite the upper band, but potentially constructed via a different function or parameterized differently than the upper band function
The classic Bollinger Bands strategy depends on crossover events (signals) for the upper and lower band and the midpoint.
type sigCrossover
, if the Close price is greater than the upper band value.
type sigCrossover
, if the Close price is less than the lower band value.
type sigCrossover
, if the price at any point crossed the midpoint moving average.
In this strategy, each signal has a corresponding entry or exit rule.
type ruleSignal
, enter a sell order at market on Cl.gt.UpperBand
signal.
type ruleSignal
, enter a buy order at market on Cl.lt.LowerBand
signal.
type ruleSignal
, enter a market order to close any open position at market on Cross.mid
signal.
This strategy may be improved in practice by:
utilizing trailing entry or exit orders
using a different smoothing mechanism other than SMA
the addition of stoploss rules
http://www.investopedia.com/articles/trading/07/bollinger.asp
http://www.mysmp.com/technicalanalysis/bollingerbands.html
http://tradingstrategies.netfirms.com/trading/bollingerbandtactics.htm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.