The “% Bollinger in Trend” strategy

The “% Bollinger in Trend” strategy

Hello everyone,

Here is a strategy that mixes the « % Bollinger » indicator, with the trend.

One of my readers made me discover an ebook of Charles Dereeper, who spoke of it. The concept does not come from him, it is well known.

But I found the idea of ​​associating this indicator with the trend very relevant, so I tried to code this strategy.

As a reminder, the « % Bollinger » indicator is defined by :

% Bollinger = (closing price – lower Bollinger) / (upper Bollinger – lower Bollinger)

The ProRealTime indicator is coded by myself like this :

We will associate this indicator with the trend.

In bull market, we go to purchase if :

close > MA100

MA20 > MA200

% Bollinger < 0.2 and % Bollinger < 0.2 on previous candle (consolidation)

We close the trade if :

% Bollinger > 1

As you can see on the following test (S&P500 INDEX, daily chart, spread 1 point), the strategy is very successful in the bull market : profit factor> 7 !

However, there is very few position (very selective criterias), which means that there are not many gross profits, much less for example than the Swing S&P500 strategy that I personally use.

Quite sad, as I’m always looking for concepts that can improve my own algorithms.

Actually, it would be quite possible to attempt to adapt this strategy to short positions, but it seems less profitable.

You are free to try to improve this strategy.

On the S&P500, it was profitable.

It is quite possible that the parameters for the CAC40, the DAX, the stocks, etc. can be adapted.

It’s up to you.

Best regards and happy trading !

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. Nicolas • 224 days ago #

    Thanks for sharing. The backtest is made on a weekly chart in your example (that’s why PF is superior to 7). However, the strategy is also in gain on a daily timeframe. For everyone’s information, SP500 Index is not a tradable instrument, this strategy must be launched on a CFD account (ticked is US 500).

  2. Doctrading • 224 days ago #

    Hello Nicolas,
    You’re right ! I forgot to say that I wanted to make the strategy for long term trading, so I like the weekly timeframe.

    I wanted to join also a picture for daily timeframe, but the equity curve was more “sexy” on weekly timeframe, I could only join 1 picture.
    Best regards,

  3. JR1976 • 223 days ago #

    Dear Doc ,
    excellent concept

  4. SimoneDasGupta • 222 days ago #

    Nice job! It makes good results also on DOW JONES Weekely and on DAX Daily, but also with the short.

  5. SimoneDasGupta • 222 days ago #

    // short position
    ca1s = close < average[100](close)
    ca2s = average[20](close) 1 and pB > 1

    IF ca1s and ca2s and ca3s THEN
    sellshort n shares at market

    // exit short position
    if pB crosses under 0.2 THEN
    EXITSHORT at market

  6. Jonas Rydqvist • 188 days ago #

    could someone make this a screener for me 🙂 ?

  7. rejo007 • 166 days ago #

    about this, i have problem with the code below
    this line “”””””””ca2s = average[20](close) 1 and pB > 1″”””
    and i dont have ca3s

    could you help me?

    // short position
    ca1s = close 1

    IF ca1s and ca2s and ca3s THEN
    sellshort n shares at market

    // exit short position
    if pB crosses under 0.2 THEN
    EXITSHORT at market

    • Doctrading • 166 days ago #

      Hello rejo007,
      I don’t really understand your question. The code works fine for “long” trades. I didn’t make it for “short” trades.
      Give us you full code and we will fix it.
      Best regards,

  8. rejo007 • 166 days ago #

    C’est à propos de la partie “short” proposée par SimoneDasGupta un peu plus haut dans les commentaires.
    L’avez vous testé?

  9. Doctrading • 166 days ago #

    AH ok, I think the ca3 is the same :

    ca3 = pB[1] < 0.2 and pB < 0.2

    Best regards,

  10. chromosome21 • 149 days ago #

    Hello everybody,

    First, thank you so much for all your advices, I’m a begginer in trading and I think you are very helpful !
    I tried to make a screener with this indicator above but it doesn’t work, here is the screener as I write it :

    myMonindicateurBB = CALL “MonindicateurBB”(close)
    Trigger = myMonindicateurBB >= 1

    Could anyone help me for this !
    Thank’s very much in advance 🙂

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
supertiti Bonsoir à tous For those who like me want to calibrate this indicator on a scale of 0 to ...
juanj This gets me thinking about creating a strategy on the 5min timeframe that only takes trades...
GraHal I noted above does okay on DAX 10 min with even a reduction to 30 of the Stop Loss. I've s...
verdi55 You can find me at Ahh. So i got it ? 4 different supertrends without th...
juanj What? This has nothing to do with the website. The site is simply a service to help people ...
Nicolas Advertising is allowed,as long as people are helping others and if provided services are abo...
styrke Hello Nicolas, Nice screener, I appreciate the way you always try to condense at maximum th...
Nicolas There's no particular reason. RSI is widely use with its default period and results seems re...
Vonasi I noticed a couple of typo errors in the code. The list of variables lines 4 to 11 should be...
Genotik Thank you for your important contribution this week which is much appreciated! Happy New Yea...
Vonasi No problem. I hope they are useful to someone. Happy and hopefully prosperous New Year to y...
DarioMazza Hi Vonasi, i have a question for you, the comand "pricetype" where did you found it in the ...
Vonasi PriceType is just a variable that I use. The value decides what type of price is used in the...
Vonasi I noticed a couple of typo errors in the code. The list of variables lines 4 to 11 should be...
lumarino Bom dia Ale. Obrigado pela partilha. Você tem alguma das suas estratégias operando em Modo R...
lumarino Qual é então a sua Estrategia de eleição ALE??
3 months 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
Alai-n Merci pour ce travail...
patmaba merci Alai-n. C'est ma première participation sur prorealcode, merci pour à toi pour ton co...
swapping Oups nicolas ! je pense que tu a oublié de mettre les variables "setting" accessible en exte...
Nicolas Je viens de vérifier, elles y sont pourtant?
swapping Mea culpa, j'ai fait un bête (copier/coller) et forcément cela ne pouvait pas y être puisqu'...
4 months ago
Genotik Merci !
Nicolas Acheter une boule de cristal ? :) Désolé mais ici comme ailleurs, nul ne pourra savoir de qu...
bobrenard96 Ah bah non... c'est pas juste... m'enfin ! Moi, je ne veux que des signaux gagnants... Mieux...
Nicolas Très bien ! Pourquoi ne pas ouvrir une file dans le forum de trading : https://www.prorealco...
5 months ago
Marcel For those who are interested, I post trade opportunities with this indicator on Twitter. (@M...
swapping Thank you for sharing, best regards
Tellie2015 tack ska du ha för dina delningar både här o twitter
Genotik Merci de votre contribution !
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
5 months ago
primo1 Bonjour Nicolas, sur quelle échelle de temps minimum tu utilises l indicateur je pense...
primo1 Bonjour Nicolas Pour créer la strategie comment peux tu traduire l"apparition des points....
Nicolas Exemple dans ce sujet du forum ProOrder :
thierryp Bonjour Nicolas, merci pour le travail que vous effectuez. Je ne suis vraiment pas bon dans ...
Wiezman74 any chance you can email me this indicator for MT4,, can't get the code to work.. limited kn...
Nicolas This website is dedicated to prorealtime programming. But you can ask for custom programming...
bolsatrilera Hi Nicolas, I have this version of the True Balance Power ,created by eykpunter on Tradingvi...
bolsatrilera and the code : REM TRUE BALANCE OF POWER // código original de eykpunter para la plataform...