Bollinger Band Based Trailing Stop Loss – Amibroker

BBand TSL or Bollinger Band based Trailing stop loss trading is once again a mechnaical trend trading system for lower timeframes inspired from mql4 (metatrader). The trailing stoploss method is completly built using bollinger bands and completely fits for stop and reverse strategy.

1)The green line indicates trailing stop for longs
2)The Red line indicates trailing stop for shorts
3)The Green Arrow indicates longs
4)The Red Arrow indicates shorts

DLF Futures
[DLF Futures 10min charts]

1)Trailing Stoploss Lines
2)Buy/Sell Signal Added
3)Magnified Market Price at the right top corner
4)Timeleft counter to idenfity the end of the candle
5)Non Repainting – Arrows will form only after the end of the candle. No arrows will disappear once the signal formed.

Recommended Timeframes
5min/10min,15min. Dont try with higher timeframes as increase in timeframe will increase the risk in this particular trading strategy. And moreover it is a carryforward strategy and not a perfect intraday strategy though. But work pretty good in high volatile environment.

Steps to Install
1)Download BBand TSL Trading System for Amibroker
2)Unzip BBand TSL Trading System to local folder
3)Copy file to \program files\amibroker\formula\basic folder
5)Open Amibroker and Open a New Blank Chart
6)Goto Charts->Basic Charts and apply/drag-and-drop the BBand TSL Trading System code into the blank chart
7)Bingo you are done. Now you will be able to see the BBand TSL Trading System indicator with Buy and Sell signals.

Amibroker 5.5 and above

Related Readings and Observations

  • ATR Volatility Long Only Trading System Yet another ATR Volatility based Long only Trading System. ATR Volatility system a mechanical strategy for higher time-frames Written by Tudor Marcelin - Art Invest. Just modified the […]
  • Things You Need to Know About VWAP In finance terms, volume-weighted average price (VWAP) is defined as the ratio of the value traded to total volume traded over a particular time horizon (usually one day). It is a measure […]
  • Rotation Factor – Amibroker AFL Code Rotation Factor is a sentimental indicator used in Market Profile to Indicate who is control (Buyers/Sellers) in the market for the day. If the rotational factor prints positive values […]
  • Full Gap Open Range Strategy – Amibroker AFL Code Here is a simple Full Gap Open Range Strategy for intraday traders to trade the big gap ups and gap downs using open range breakout. And more important strategy is back-testable.


  1. Deepak says

    Hi Rajandran,

    Do we have back tested results for this, how have you found them, if you could please share.

    Thanks for your efforts.

  2. Ravi Shanker Reddy Kourla says

    Hi Rajendra,

    I am not able to do the backtest with the given AFL code. If possible can u please do the needful changes to AFL to do the back testing.


    • says


      Try adding the following code to the top of afl if you wanna test with 100 shares every time. Very the numbers and make sure you understand the backtesting with futures correctly.

    • says

      Hi Ajay,

      Most of the Graphics functions are not supported by 5.2 and it is quite meanigless to implement this indicator without dashboard. If you want to build the indicates remove all the codes below the plotshapes function. That makes the indicator to work but not the dashboard functions and timeleft features.

  3. Nehal Suthar says

    hi rajandran, i don’t understand why my comments are not accepted by you but this is for the third time i’m asking you the same question. on your eod signals page, hourly chart shows “intra trend afl code”. so, can you please tell me is it different than “super trend afl”? thanks!


    Dear Sir,
    Whenever you done new post for AFLs then please notify me by email given above


    Hi Rajendra,

    I am not able to do the custom indicator save with won password in amibroker with the given AFL code. If possible can u please do the halp this matter.


Leave a Reply

Your email address will not be published. Required fields are marked *