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?

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

  1. Nicolas • 08/01/2017 #

    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 • 08/01/2017 #

    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 • 08/01/2017 #

    Dear Doc ,
    excellent concept
    Regards

  4. SimoneDasGupta • 08/01/2017 #

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

  5. SimoneDasGupta • 08/01/2017 #

    // 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
    ENDIF

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

    • Doctrading • 08/01/2017 #

      Excellent, thanks SimoneDasGupta !

    • bertrandpinoy • 08/01/2017 #

      bonjour j ai un probleme avec ce code modifié, apparement PRT ne veut pas…avez vous une solution? merci

  6. Jonas Rydqvist • 08/01/2017 #

    could someone make this a screener for me 🙂 ?

  7. rejo007 • 08/01/2017 #

    Hello,
    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?
    thanks

    // short position
    ca1s = close 1

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

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

    • Doctrading • 08/01/2017 #

      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 • 08/01/2017 #

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

  9. Doctrading • 08/01/2017 #

    AH ok, I think the ca3 is the same :

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

    Best regards,

  10. chromosome21 • 08/01/2017 #

    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
    SCREENER[trigger](myMonindicateurBB)

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

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+3 more likes

Related users ' posts
luiskohnen Parece un excelente indicador, lo voy a analizar. Muchas Gracias
Iván De nada!
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
Iván
1 month ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
2 months ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Iván
2 months ago
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
phoentzs
5 months ago
Gio56 Bonjour, merci pour ce code. j'ai juste un problème sur le code, j'ai un message “L’instru...
Nicolas Il faut supprimer cette ligne qui est utile uniquement pour visualiser des valeurs durant le...
Gio56 Super merci Nicolas cela fonctionne. Top
Fgats
5 months ago
bousalahane hello, thank you for sharing, I’m not top strong in the programation part, there is a way to...
Fgats Hi, With this indicator I just wanted to show the interest that can exist to synthesize th...
davidguerreir how to adapt nbStdSig values ?
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
8 months ago
B-Xtrender
B-Xtrender
7
Indicators
Fgats I suspected something like this but in the PRT documentation I couldn't find anything to exp...
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
JS
8 months ago
Trendilo
Trendilo
0
Indicators
Nicolas
8 months ago
Anthony2A Bjr, j ai des erreurs sur la ligne 69, 74, 78 et 80. sur drawcandle drawtext et endif. si ...
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
10 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!

Top