Trend Chaser v2.0

Trend Chaser v2.0

I posted “Bullish and Bearish Forex Screeners (based on 3 indicators)” about 4 months ago and had a lot of suggestions and support from @Nicolas, @Sofitech and @Doctrading to develop an automatic trading system.

Well, after a lot of testing, I have come up with the attached system.  It seems to be happier in the longer time frames viz. H4 up.  I have posted it with two variables, a and b, which are the parameters for the SuperTrend indicator.  Since this is the exit signal, it is important to optimise these variables for the instrument you plan to trade.  Then enter the results of the optimisation into the code and prepare it for automatic trading.  I suggest you test it forward first before committing real money.

I found a wonderful site for the procedures involved in creating and testing a strategy at https://trading.prorealtime.com/en/create-a-trading-system, for those of you who haven’t found it already.

I have also attached the results from 4 tests, of which the DAX was the most spectacular, with 2000% gain in about 15 weeks.  However it had the largest drawdown.

So have fun playing with this.  I look forward to your suggestions for improvements.

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. Lepori Joël • 08/20/2016 #

    Hello Mike,
    Thank you so much for the nice strategy and for your nice work, i install and I have make a lot Backtest  ( with the Dax at 1 euro ) the result is very good !
    I have one question wen i look my backtest i see time to time : Buy 30 contrat or sell 30 contrat I dont understand why because your code specifies one contrat.
    I wish you a good start to week 
    Jo

    • MikeGC • 08/20/2016 #

      Hi Lepori Joël, larouedegann is correct.  If you set “cumulateorders” to false, it will only initiate one contract.  But that will reduce the return.  One needs to “make hay while the sun shines” and get the best of a long trend.

  2. larouedegann • 08/20/2016 #

    HELLO joel
    I think because DEFPARAM CUMULATEORDERS = TRUE

    • bertrandpinoy • 08/20/2016 #

      bonjour Mike j utilise TrendChaser V2.0 et quand il prend position cela ne programme pas le SL chez le brooker? que se passe t il? merci

  3. larouedegann • 08/20/2016 #

     
     
     
    CumulateOrders = FALSE // Cumulating positions activated
    // IndicatorsCOI = WEIGHTEDAVERAGE[10](ROC[14] +ROC[11])MAC = MACDline[12,26,9](close)STO = Stochastic[14,3](close)ST = Supertrend[A,B]
    // Conditions to enter long positionsc1 = COI > COI[1] AND COI < 0c2 = MAC > MAC[1] AND MAC < 0c3 = STO > 20 AND STO < 40
    IF c1 AND c2 AND c3 THENBUY 1 CONTRACT AT MARKETENDIF
    // Conditions to exit long positionsc5 = close crosses over ST
    IF c5 THENSELL AT MARKETENDIF
    // Conditions to enter short positionsc11 = COI < COI[1] AND COI > 0c12 = MAC < MAC[1] AND MAC > 0c13 = STO < 80 AND STO > 60
    IF c11 AND c12 AND c13 THENSELLSHORT 1 CONTRACT AT MARKETENDIF
    // Conditions to exit short positionsc15 = close crosses under ST
    IF c15 THENEXITSHORT AT MARKETENDIF

  4. MikeGC • 08/20/2016 #

    Hi Lepori Joël, larouedegann is correct.  If you set “cumulateorders” to false, it will only initiate one contract.  But that will reduce the return.  One needs to “make hay while the sun shines” and get the best of a long trend.

  5. Lepori Joël • 08/20/2016 #

    Hello Mike and  larouedegann,
    Thank you so much for your help and fast answer.
    I wish you a good start to week
    jo

  6. CKW • 08/20/2016 #

     Hi  MikeGC,
    Thanks for your sharing. I tried it on DAX
    Overall the probability winning trades seems good but it can be risky without SL. Have you try to putting SL to avoid large drawdown? I tried but result is not good
    Br
    CKW

  7. MikeGC • 08/20/2016 #

    Hi CKW, 
    The SuperTrend is the stop loss and exit.  That is why it is important to optimise the variables for the ST for the instrument you are trading.  For instance, I have the ST set at 4,42 for the DAX.  I set it up to auto trade on Monday at the open and it is currently showing a profit of some EUR 11,000 using an account of EUR 10,000 to start, with a spread of 2 points and no fees.
    I agree with you that the drawdowns during testing have been high, but it is a trade-off.  The higher the drawdown risk, the more room the system has to “breathe”.  However, I will be looking at ways to introduce money management rules to limit the drawdown.  Any ideas?
    Cheers,
    Mike

  8. Elsborgtrading • 08/20/2016 #

    Hi Mike and thanks for sharing. It looks very promising -on the back test. I took a quick test on DAX mini £1 and I gained around 2000% from aug2012 until now. The problem is that it looks like a martingale code(?) I’m no expert but lets say that jan 2015 to apr 2015 it keeps selling on a rising trend- it of cause gets “rescued” in the end and only looses 46000 euro – however if this was on a live trade with IG and you put 92 contracts up with a P/L around -100000 euro and 50000 left in your account you will almost get a margin call. Same with all the other cycles of adding contracts- it’s balancing on a margin call from time to time(without having tested it in depth). Rule of thumb at least what I’ve heard, you should always manage your money and only trade for 1-2% of what you can afford to loose. this means that max2% with a P/L on -46000 euro you should have 2.3 mill euro on the account. One day in the future we might not be that lucky and getting stopped out by a margin call. However IG will only close some of the position until you have the required margin again so it will properly never loose the entire amount in the account- only prolonging the emotional pain. Think about if you sat and watched you equity fall from 156000 to 50000 euro live you would not be able to sleep, eat or think about anything else for 4 month, you would be max stressed out not knowing where this would end. Just saying 🙂

  9. MikeGC • 08/20/2016 #

    Many thanks, Elsborgtrading, for your comments.  The draw down is a major issue.  Perhaps I should have labelled the code “beta” as there is still a lot of development to do.  With Nicolas’ and cfta’s permission, I would like to incorporate their money management code.  The post was “Grid orders with one combined stop loss and limit, can it be done?”.
    The other work needed is to reduce the number of false trades by having the entries based on a divergence between the Coppock and price.

  10. Elsborgtrading • 08/20/2016 #

    Hi Mike. Yes that was excatly my thought as well, that the cfta strategy proberly would do some good here:-) I will follow your progression. *thumbs-up*

  11. MikeGC • 08/20/2016 #

    Traders, I have managed to incorporate the money management code with the Trend Chaser code with excellent results.  I’ll start a new thread with Trend Chaser v.3.0 with Money Management.  Many thanks to all assistants and inspirers. 

  12. Mr. Bigshot • 08/20/2016 #

    Hello! 
    Can someone please tell me why back testing DAX 4 h with the same data gives different results ?
    I use Pro Real Time  
    Thanks -Morgan

    • Nicolas • 08/20/2016 #

      You are probably testing this strategy on Futures contracts, not CFDs ones.

  13. Mr. Bigshot • 08/20/2016 #

    Thanks for your answer.
    I’m new on trading. I really don’t know what you mean 🙂 But I tested on Germany 30 cach mini 1 euro.
    /Morgan

  14. MikeGC • 08/20/2016 #

    It could be that you are trading mini contracts.  I ran the tests on full contracts.  Make sure that you are testing over the same time period.   Let me know how you go.

  15. ToGast • 08/20/2016 #

    Die folgende Variable ist nicht definiert: aDie folgende Variable ist nicht definiert: b
    ST = Supertrend[a,b]
    Was muss ich machen?
     
    Danke!

    • MikeGC • 08/20/2016 #

      Hi ToGast, I have left the variables in the code so that you can optimise them for the instrument and time-frame you will be trading.  Simply enter the variables into the proper area of the back tester.  Give a a range of 1 to 10 and b a range of 1 to 30 and optimise.  If the top of a range of either is hit, increase the range and run again.  You will need at least 50% winning trades and a reward/risk ratio of at least 2:1, with a minimum drawdown before you would run it live.
      I have modified the code since posting v.2.0.  You will find it in my post Trend Chaser v.3.0 with Money Management.
      I have found the best results with a stop loss of some description as the three indicators can take the wrong trade, hence my suggestion that you do not trade a system with less than 50% winning trades.
      Have fun.  Please let me know how you go.

    • ToGast • 08/20/2016 #

      Hi Mike, I have a strategy that I would like to introduce you. Sorry, I can not send you pictures.
      Can I write you an email?
      Greeting Torsten.
       

    • ToGast • 08/20/2016 #

      Hi Mike, I have a strategy that I would like to introduce you. Sorry, I can not send you pictures.
      Can I write you an email?
      Greeting Torsten.

    • Nicolas • 08/20/2016 #

      You can also open a new forum topic for this 🙂

  16. ToGast • 08/20/2016 #

    Thank you Mike!

  17. ToGast • 08/20/2016 #

    Hallo Mike, ich habe eine Strategie die ich Dir gerne Vorstellen möchte. Leider kann ich Dir keine Bilder senden.
    Kann ich Dir eine Mail schreiben? 
    Gruß Torsten. 

    • MikeGC • 08/20/2016 #

       Hi Gruß,  I’m afraid I can only read a very little German.  Can you please repeat your comments in English?
       
       

    • MikeGC • 08/20/2016 #

      OK, Gruß, I have had your message translated. My email is mikegchampion at gmail dot com.  But I would prefer to use the forum so all can share our ideas.  You can send pictures via the forum.  If you are having troubles, go to the help section of this forum.  Looking forward to hearing from you.

  18. gianpiero75 • 08/20/2016 #

    hi, 
    I’m trying real system on my Ig account, but constantly fails with this message: the trading system was shut down because of a negative offset or zero …how to solve it?

    • MikeGC • 08/20/2016 #

      Hi @Gianpiero75,
      Are you using the original code?  If not, please send me a copy of the code you are using.
       

  19. MikeGC • 08/20/2016 #

    Hi @Gianpiero75,
    Are you using the original code?  If not, please send me a copy of the code you are using.
    I have run the code on the AUDUSD and posted the results of the optimiser and backtest.  I have also started the code running in ProOrder, all without and error messages.  So please send me the code you used with details of the exact circumstances of the error so I can find the problem.  Did it occur as soon as you started ProOrder or sometime later?  Did it create any orders before the error?  Please send me a copy of the message, and any  other details you think might help.
     

  20. gianpiero75 • 08/20/2016 #

    hi @MikeGC
    the code is original, I just changed the parameters of the indicators in order to adapt to 4 hours TF. It crashes every new candle of 4 hours. no place orders
    it crasches even in Daily TF. I dont Know where’s the problem.
    thanks a lot…
    DEFPARAM CumulateOrders = false // Cumulating positions activated

    // Indicators
    COI = WEIGHTEDAVERAGE[58](ROC[81] +ROC[63])
    MAC = MACDline[69,150,52](close)
    STO = Stochastic[81,17](close)
    ST = Supertrend[a,b]
    a=17
    // default 10
    b=58

    // Conditions to enter long positions
    c1 = COI > COI[1] AND COI < 0
    c2 = MAC > MAC[1] AND MAC < 0
    c3 = STO > 20 AND STO < 40

    IF Not ShortOnMarket AND c1 AND c2 AND c3 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    // Conditions to exit long positions
    c5 = close crosses over ST

    IF c5 THEN
    SELL AT MARKET
    ENDIF

    // Conditions to enter short positions
    c11 = COI < COI[1] AND COI > 0
    c12 = MAC < MAC[1] AND MAC > 0
    c13 = STO < 80 AND STO > 60

    IF Not LongOnMarket AND c11 AND c12 AND c13 THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF

    // Conditions to exit short positions
    c15 = close crosses under ST

    IF c15 THEN
    EXITSHORT AT MARKET
    ENDIF

     

  21. MikeGC • 08/20/2016 #

    Hi @gianpiero75,
    I don’t believe in changing the parameters to suit the time frame.  I believe that the parameters are universal and suit all time frames.  For instance, the parameters for the Coppock refer to the bars, so regardless of the time frame, the number of bars won’t change.  Try restoring the original parameters and see if it crashes then.
    Cheers,  Mike

  22. gianpiero75 • 08/20/2016 #

    Hi Mike...I found the error. It\'s a stupid mistake made by me, but hard to notice ...error
    ST = Supertrend[a,b]
    a=17
    // default 10
    b=58

    correct

    ST = Supertrend[a,b]
    a=17
    // default 10
    b=58
     

  23. gianpiero75 • 08/20/2016 #

    sorry….now it’s correct
    error
    ST = Supertrend[a,b]
    a=17
    // default 10
    b=58

    correct
    a=17
    // default 10
    b=58
    ST = Supertrend[a,b]
    was just a question of code position

  24. MikeGC • 08/20/2016 #

    I don’t know if you have used the variables a and b to optimise the parameters for the SuperTrend.  This is their purpose and should be set for each time frame and each instrument . 

  25. gianpiero75 • 08/20/2016 #

    I have not optimized, I multiplied the parameters for 6 (5,8), to use them on the 4  hoursTF. and works very well in the backtest, now I’m using it in real…

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
haseluis Hello, who can help me why the screener does not work // Der folgende Code bezieht sich auf...
Nicolas Hello, please ask your question with a new forum topic, this is not the place to ask for sup...
stratobast Good afternoon everyone. Thanks Doctrading for your work. I have an issue while using this ...
stratobast My bad guys. I understood what was the problem. The indicator uses highs and lows for the Re...
samwarduk Has anyone tried this on Bitcoin GBP1? The results look amazing but every time mine trie...
Kris75 Hi Bolsatrilera, I love this indicator! Thanks; => did you develop a strategy around...
Francesco
8 years ago
oraclus Merci il lui ressemble bcp
juanj Think this is something we can experiment with in the 'universal' strategy along with the Bo...
ggolfet Hello Francesco, thanks for the code. Now I can do backtests on this indicator. I'm testin...
Doctrading AH ok, I think the ca3 is the same : ca3 = pB[1] < 0.2 and pB < 0.2 Best regards,
chromosome21 Hello everybody, First, thank you so much for all your advices, I'm a begginer in trading a...
bertrandpinoy bonjour j ai un probleme avec ce code modifié, apparement PRT ne veut pas...avez vous une so...
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 ...
IV Mcm Your indicator is interesting, I evaluated its relevance with the squeeze to detect the phas...
Kris75 Hi Gabri I launched a very simple strategy based on the 3 bars trailing stop that you cre...
TimDeCat Hi. Has anyone coded a version that you could alter it to say 5 bar trailing stop? ie make ...
Nicolas Please open a new topic in forums so we can code it there, thanks.
Pier
8 years ago
Cris48  Nice Pier, I put inside also the adx .... //settings//b=20 if low < low[1] thenllv = (...
parthdesai11 Indicator not working in Beta Version 11.1 , Any idea ??
Nicolas What is the issue with version 11 and this indicator please?
finplus bonjour, il y a un problème à la fin du code avec elsif (close 0 then ... ne manque t il pas...
kj1988 Hello Nicolas, thank you for this useful indicator. Could you tell me how I can remove the...
Nicolas remove lines 101 to 103
Lotech123 Thanks for this indicator. Working on a 3 M timeframe with the DJI, it can produce some inte...
JSTAR PRODUCTIONS Hi there, I downloaded the Indicator but the indicator does not show up on my charts. Am...
JSTAR PRODUCTIONS Hi, Worked it out. Thanks
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/
Bernard13 Bonjour Nicolas, Pourriez-vous m'indiquer si cet indicateur fonctionne avec la V11 ? Le di...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
HeikinAshi Do you have an update of this indicator since you've created them, or is this still the actu...
mcha Thank you for this work. Do you try to transform/put this indicator on candlesticks and is ...
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
arvindrao01 Hey! Does anyone have a pinescript (tradingview) code for this?
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...
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.
Bolbo It does not appear over the price indicator on V11. Thanks in advance.

Top