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
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
Nicolas Sorry there was a small issue in the code, i have changed the attached itf file and updated ...
Mitchy14 Hi Nicholas, apologies, I am usually fairly good at implementing your creations (for which I...
Nicolas Are you using PRT version pre-v11? TIMEFRAME for indicators is possible since months for pro...
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
Nicolas C'est dans ce sujet: https://www.prorealcode.com/topic/trendline-une-approche-du-trading/ M...
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
Nicolas Merci d'ouvrir un sujet dans le forum des screeners en respectant les règles de publication ...
Pensera Bravo Nicolas ! Tu es en quelque sorte l’inventeur de Metascore…(oups je viens de lire jusqu...
Nicolas Dans un but d'investissement pure, et non spéculatif.
Fabian Hi Thomas, thanks for your explanations. Which indicator do you use in the screenshot ...
Thomas Thats On Balance Volume and Bollinger or SMA or what you want. It shows me the volume flow. ...
bertrandpinoy @MAKSIDE I would be grateful if you send me your version. have a nice day
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
oraclus Bonjour indicateur très intéressant existe t il un screener qui détecte les actions qui donn...
IV Mcm Ce n'est pas le but de cet indicateur, mais avec un peu d'entraînement vous pourriez le code...
Yantra Thank you for sharing your good work!
imonix Have been trying this on demo since Monday before deciding whether to go live with it. Using...
Roberto Blázquez I'm sorry, I've tried it since November 2012 and it's bad results.
Dunstan I would like to get guidance_ How do I access and attach this indicator to my MT5 platform...
Nicolas You can't, use prorealtime, it's way better
jc84 Thank you very much for this indicator , not provided by PRT I was actually working at thi...
Guillaume Mcm I gave the above message fix ;)
Tradingrob Is it possible to put the itf-file in the right way here in Prorealcode? so the right 'trend...
Guillaume Mcm Update link ;) https://www.prorealcode.com/topic/trend-histogramme-cci-mise-a-jour-suite-...
Pierreco1991 Hello Can you confirm this configuration for FRANCE ? //Time in UTC+8 Rest0Minutes =...
Screw27 Hi man, I installed the indicator and i don't know why but my graph it is so big
HelixKing sounds interesting I'll take a look
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...

Top