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 • 17 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 • 17 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 • 16 days ago #

    Dear Doc ,
    excellent concept
    Regards

  4. SimoneDasGupta • 15 days ago #

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

  5. SimoneDasGupta • 15 days ago #

    // short position
    ca1s = close < average[100](close) ca2s = average[20](close) < average[200](close) ca3s = pB[1] > 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

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
JohnScher So, and now who would write the code ?
sreenivas Hi all , i am newbie here, the above bollinger moz indicator for which platform , is it not ...
Nicolas This website is dedicated to prorealtime trading platform programming.
juanj For above modification also add to the entry criteria to initialize the values; 'LE = 0' ...
juanj @Nicolas I see it also significantly brings down the drawdown on the CAC40. Btw why is th...
juanj To follow new developments or get the latest version of this strategy please visit the forum...
atxeel Real Awesome, thank you man!
rispardin no entiendo como funciana este indicador, por favor alguien podria explicar como utilizarlo???
AVT No se trata de un solo indicador, pero cada linea muestra otra información, de abajo hacia ...
gabri Franz, can this code work for you? count=1 i=0 j=i+1 tot=0 //calcolo 3 barre while co...
Francesco78 Hi, can you show at least one strategy that works well with this indicator? The idea is nic...
gabri Francesco, I just tried to code an idea from Maximus 78 (https://www.prorealcode.com/topic/...
manel Ok, many thanks. I've tried messing around with the code myself but am no closer to solving ...
mcha Merci à Nicolas pour cette approche nouvelle et qui prend en compte l'action des prix. Est-i...
Nicolas Il faut supprimer les lignes 101 à 103
gabri GraHaL, I cannot see any link attached. I mostly manual trade but for stocks with strong fi...
GraHal Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
gabri Here's the thread https://www.prorealcode.com/topic/multiframe-rsi-of-rsi/
CKW Thanks Pier! Excellent! I add the SL capped at 0.8% for safety purpose. The Backtest perfor...
JR1976 Dear Pier ,  your screenshot which rappresent the backtest , is since dec 2009 , but the eq...
CKW Dear Pier, Does it work on forex?
Nicolas Thanks for sharing your automated trading strategy idea. Even if you accumulate loosing orde...
Maz Ok. Potential here to build onto this. Have opened a forum thread for further discussion: h...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
reb Hello Marc your strat seems very intersting, will take a look Reb
897148 What exactly is meant by Total price? Is r1 =28 in your example the no of days for "Total P...
otty82  THX looks good!
century nice one , thank you
imokdesign Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
Inertia newlevel then multiplier=multiplier+1 oldlevel=newlevel newlevel=strategyprofit+startequi...
Inertia Hi Bjoern, I was playing around with your code this morning (EUR/USD 5'). Thank you to the...
Nicolas An answer to a query that has been posted in the squeeze indicator: https://www.prorealcode....
Nicolas ok, so your query should be asked there: https://www.prorealcode.com/prorealtime-market-scre...
Nicolas answered here: https://www.prorealcode.com/prorealtime-market-screeners/ttm-squeeze-fired-sc...
mcha Bonsoir Nicolas, Merci beaucoup pour ce complément de code, qui fait disparaitre l'histogr...
Frankiesc Thanks Nicolas for sharing this indicator, it's interesting
CavalierDeCesDames Bonjour Nicolas, Thanks for your use full job. I tried this indicator on a shorter timefram...
Nicolas You are welcome. I'm glad you like it.
ade1 Hullo Nicolas, when i put the indicator on my chart ,it comes as an indicator below the cha...
Nicolas Apply it on price instead with the wrench on the upper left side of the price chart.
ade1 thankyou
Raspoutine Hi Nicolas,The results are not identical   ma200 = Arevage(200) //c4 = summation[2...
Magela01 is this ok with AMibroker?
Nicolas Prorealcode is a website about prorealtime trading platform programming, this code will not ...
platypus Bonjour Nicolas, Merci pour cet indicateur. Juste une question : les chiffres "upcount" en ...
Nicolas Il faut simplement changer les codes RVB de toutes les instructions "Coloured". Il y a des e...
platypus Bonjour Nicolas, Merci pour votre réponse. Grace à celle-ci, le désagrément a été rectifié....
supertiti amplitude 1.2.3  = ( 2-6-30 ) or (1-1-27) ?
LUCASSEN Hallo Supertiti Macd amplitude=1-1-27    and    prc halftrend triple in Heikin Ashi  grafie...
supertiti Thanks you so much Lucassen

Top