BollingerBands  |  BollingerOnBollingerBands  |  BBForex  |  EquityTrader  |  BollingerVideo  |  GroupPower  |  MarketTechnician  |  PatternPower  |  BBScript  |  Mobile  

Welcome to BBScript, a platform for building technical-indicators, testing trading ideas and creating trading systems. BBScript was created by John Bollinger and is an integral part of the Advanced Charting Package available on www.BBands.com, www.EquityTrader.com and www.BBForex.com. Documentation, practical examples and a help forum are available at www.BBScript.net.

BBScript is a very high level market-analysis and trading language that is powerful and easy to use. In BBScript most of the hard work has already been done for you, allowing you to get on with your analysis. Using BBScript you can easily create nearly any indicator you can imagine and with the latest version you can easily test your ideas with our new Backtester. The BBScript Backtester is purposely simple, it lets you easily try out your ideas and automate them if needed. It is not a complicated professional backtesting environment with a steep learning curve like those found in some high-end systems, rather it is a simple, quick and direct way to test your ideas. You can also test any of the Bollinger Band methods or any of the BB indicators, including the newest work, as they have all been pre-programmed for you.

One of our Backtester's best features is its equity curve plot that allows you to see at a glance how your approach is doing over time. Of course BBScript offers the normal system statistics, but seeing the shape of the equity curve over time is worth 1,000 stats. Seeing your signals on the chart can be equally important, so BBScript will plot them directly on the chart for you. To help you analyze your signals we consecutively number the entries and matching exits so you can instantly see which are paired. In addition, just click on any entry or exit and its complement will be instantly highlighted.

In BBScript we offer a sophisticated and intuitive visual approach to creating indicators and building trading approaches. You can create your own indicators or use our wide array of pre-built indicators including many indicators that just aren't available elsewhere. Once your approach is built you can easily test and evaluate it. In the final analysis we think that BBScript offers a powerful and easy to use analytical approach without the needless complexity of the high end—and high priced—platforms.

The documentation and example pages offer many examples of indicators and systematic trading approaches to help you get started. You can just copy our examples, paste them into the BBScript application and then modify them to suit your needs. If you have any questions or need some help working out an indicator or system we'll be there to lend a helping hand. Just post your question to the BBScript discussion forum and we'll respond as soon as we can.

Here is an example of a basic BBScript that you can play with to get you going:

// Written by John Bollinger April 2014
// use the data from the chart
data("x")
// Bollinger Bands using built-in functions
middleBB = bbands(x, 20, 2, "middle")
lowerBB = bbands(x, 20, 2, "lower")
// back in the lower BBands = buy
entry = xover(close(x), lowerBB)
// tag the middle BBand = sell
exit = -xover(close(x), middleBB)
// group buy and sell signals in one array
signals = entry + exit
// back test type 4 = discrete trades, use stops, no pyramiding
back_type = 4
// stop type = Chandelier
stop_type = 0
// run the back test
bt = backtest(x, signals, back_type, stop_type)
// prepare price chart with signals
plot1 = plot(close(x), "signals", "line", "00000000", bt)
// show chart with signals
pchart(plot1)
// calculate equity curve without compounding
equity_curve_calc = 0
// get equity-curve array using the back-tester object
eqCurve = equitycurve(bt, equity_curve_calc)
// create equity-curve plot
plot2 = plot(eqCurve, "EQ Curve", "line", "0000ff")
// display equity-curve chart
chart(plot2)