Bollinger Range Bound

Bollinger Range Bound

Here is a smart idea for an indicator to detect range, as it compares 2 bollinger bandwidth spread as an hint for current price contraction.

When the oscillator is set to 1, price is ranging and “NoTrade” would be initiated.



Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. trabucaire • 03/03/2016 #

    Hello, what does it mean the 20 and 40 number on this code ?
    Thank you !

  2. robertogozzi • 271 days ago #

    I modified it to make parameters customizable and to Draw a Grey candlestick when a range is detected (sorry for the code, but the “Add PRT code” button didn’t work):

    // Bollinger Band range setection
    DEFPARAM CalculateOnLastBars = 1000
    // BB1 = 40
    // BB2 = 20
    // RangeDivisor = 2.0
    a = BollingerUp[BB1](close)
    b = BollingerDown[BB1](close)
    B1Range = a – b
    c = BollingerUp[BB2](close)
    d = BollingerDown[BB2](close)
    B2Range = c – d
    if B2Range < (B1Range/RangeDivisor) then
    DRAWCANDLE(Open,High,Low,Close) COLOURED(230,230,250,255) bordercolor(0,255,255,50) //Cyan border
    //NoTrade = 1
    //NoTrade = 0
    return // NoTrade AS "No Trade"

Register or


avatar avatar avatar avatar avatar
Related users ' posts
Brisvegas Thats Awesome thank you
ALE Very Very Nice
DanT01 Hi Nicolas, great work! Is it possible to contact you to help with a couple of indicators? T...
Nicolas Assistance is free on forums. For private job, you can contact me with the trading programmi...
kuroobi Parfait , merci beaucoup .
Juan Salas Hi FULVIO09, Nice piece of work. It seems to work very well. Does only work for INDEXES??...
Johann Hi @FULVI09, I understand the instructions however I'm not too sure how to determine the "p...
winnie37 Merci Nicolas. J'ai un bug d'affichage quand j'utilise ton indicateur. La bougie en cours ...
ullle73 nicolas, can you somehome make this to be in the background of the price chart?
1 year ago
Trinity Impulse
Trinity Impulse
ribou bonjour Nicolas Bravo pour l'ensemble de ton oeuvre très riche en informations de qualité ...
Nicolas Cet indicateur nécessite que l'instrument possède des Volumes. Sinon il ne pourra pas se cal...
ribou ah d'accord merci beaucoup
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
fabio407 Thanks, Nicolas. Very useful. Would you tell me where to find what result conveys the functi...
Nicolas This is not an instruction of the programming language but a variable from this indicator (l...
fabio407 OK. I didn't notice it. Many thanks, Nicolas!
Wilko  Nice method of making linked AND-statements more readable!
Wilko And not only readable.... makes it much easier to iterate different entry/exit-conditions, d...
IGOSNELL Hi Interesting strategy, when I used $ M-R Dif EURUSD M15 Long if does not enter any positi...
Nicolas Tous les paramètres à modifier sont situés entre les lignes 8 et 16.
carlo__ Hi Nicolas, sorry for the noob question. I want to test the script on stocks. Which are the ...
Nicolas Change the stoploss and takeprofit value to percent ones. And change the SET TARGET PROFIT t...
Nicolas Yes, but that's a translation of the original code someone asked in forums.
crolakstrading hi Nicolas.. please is there's a way to fix this? what am i doing wrong? iis everyone else g...
crolakstrading what can i do to change this in to the right daily ATR? is it something to do with the timez...
Doctrading Hello,  The strategy should be improved, no doubt. But it was just one of my ideas, which h...
ALEALE Yes Nicolas is very difficult, macro economic data can destroy any work!!  
styrke depends which.. I personally think that it's much more easier to trade on XBTUSD, try to co...
David Hi Doc. Thanks for sharing. To me there's isn't much difference between this and the ATR and...
Nicolas Hi David, this code is not the proper daily ATR, which is calculated as follow according to ...
David Thanks for the explanation Nicolas.
GraHal I adjusted for GMT (minus 1 hour on all times) ... no trades. Might it be because the code ...
GraHal Ooops got that excited I sent that last one twice! ha (and can't delete it, sorry) I got it...
Eric n = 3  dont forget to allow 3 contract in proorder