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
9 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
11 months ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
FXtonio @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de...
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
Nicolas Yes, Magic if the variable that contains the value of the line, you can test if it goes up o...
dadah1987 Bonjour Nicolas, merci pour cet indicateur. Utilisant pour l'instant la création simplifié p...
Nicolas Merci d'ouvrir un sujet sur le forum avec une description complète du système.
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
Nicolas Je ne rencontre pas ce problème avec le NASDAQ par exemple, ce serait plus simple d'ouvrir u...
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
geroniman bonjour si je comprends bien, qaund els points sont verts on regarde pour un long, le blanc ...
Alfy No, the dots only show the compression of the volatility. There are 3 levels of "squeeze" wh...
ted.hulsman Hi Alfy, I'm trying to understand your indicator, so I made the Bollinger Bands and the Kelt...
Jiacky
2 years ago
Kalman Filter
Kalman Filter
0
Indicators
Stenozar Hi Sever, how can I visualize the coloured areas?
Sever Hi Stenozar, You need to add the color zones yourself , just go to Add Color Zone To set ...
atlante hi nicolas this indicator have 2 wrong borderline and islalastbarupdate. thank you can you h...
Nicolas That'"s because you are not using PRT v11? Just remove lines 59 to 62
Kanamax Hi Roberto, sorry for my confusing previous posts (forget them). My request is very simple,...
robertogozzi Please start a new topic in ProOrder support.
robertogozzi There you go: myMagicTrend = CALL “Magic Trend custom”[20, 14, 1, 5] alpha = 105 b = 0...
johann8 exactly :) Thank you all for the help!
max_92 Ciao Roberto, ho scaricato l'indicatore e come ti avevano già scritto sopra anch'io vedo la ...
Xenotrax A première vue, sa à l'air d'être un indicateur très puissant sur de petites temporalités, j...
merri Bonjour Nicolas, Comment transformer cet indicateur en bot sur PRT ?
Nicolas Cela a déjà été fait, voir ce sujet: https://www.prorealcode.com/topic/strategia-con-lindica...
bab el franco hello once installed I have no results despite different options of markets or temporality
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. ...

Top