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
Stenozar Scusa Ivan, ho trovato un'altra versione di supertrend, Kalmana Hull Supertrand, che mi pare...
Iván Ciao Certo, posso analizzare il codice per tradurlo, ma devi lanciare la richiesta da qui: ...
kats Bonsoir, Pensez vous pouvoir répondre à ma question posée ci dessus? Ce serait vraiment tr...
Iván Bonjour L'ensemble de l'indicateur est alimenté à partir de la ligne 9 avec la définition d...
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
4 weeks ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
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
3 months 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
3 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...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
Iván
3 months ago
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
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
6 months ago
Nicolas Il faut supprimer cette ligne qui est utile uniquement pour visualiser des valeurs durant le...
Gio56 Super merci Nicolas cela fonctionne. Top
banjoo78 Which is the timezone's setting of USA SP 500? I've differents results and I don't know why....
Fgats
6 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
9 months ago
B-Xtrender
B-Xtrender
8
Indicators
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à :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...

Top