OPEN-SOURCE SCRIPT

B.Bands | Augmented | Intra-range | Long-Only

Atualizado
Here you have the essential trading engine based on Bollinger Bands .
The idea behind is to trade the intra-range of the bands.

How is going to work?
  • Define which Bollinger Bands we want to use. Classic Bollinger Bands or Augmented Bollinger Bands . Without selecting, the algorithm doesn't show a strategy.
  • Define the length of the Moving Average and the Standard Deviation by default the classic 20-2.
  • Define the Bollinger Bands Spread Max Range (Upper-Lower) to be able to determine wheter or not you're in a price range or potential breakout.
  • Define data source to trigger exit and entry points.
  • Define profit based on Middle Band or Opposite Band.
  • Define Stop Loss % and activate Trailing Stop if desired with the percentage required.
  • Determine if you want to sell only on profit after triggering the entry signal. * Note Stop Loss remains activated.
  • Choose a date range if you want to study a specific period.


Bear in mind, this is the essential trading engine, open for you to test, try and improve under your requirements. You can determinate when is the ideal market to implement it based on many other indicators. Maybe you wish to change the stop loss settings for ATR, previous low, etc. Totally up to you.

Note the script comes with initial capital, fee % and slippage by deault. This may change for your assets. Make sure you define it in advance.

NOTE: If you trade assets such BTC, you must update the initial capital. By default 5000 (USD) The script doesn't support fraction trading such 0.01BTC.
Will be updated on next version.

Feel free to get in touch if you've got any question.
Notas de Lançamento
Partial contracts updated
Version updated
Bollinger Bands (BB)

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal