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
Iván
2 months ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
roccafragius Hello Ivan, very good job! May I ask you to translate teh script from TradingView named Tre...
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
Regisnew très bel indicateur merci
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
Faisalx ChatGPT Hola Iván. Gracias por tu excelente trabajo. Te agradecería si pudieras echarle un...
Iván ok, perfecto! me pongo con ello
kats Bonjour, J'ai une question etes vous trader? Je m'explique , j'ai téléchargé tous les indi...
Faisalx Hola Ivan. Thanks for your great job. I would appreciate if you have look at my request http...
roccafragius Thank you for all these useful information!! Very great job Ivan! THank you so much
geroniman Merci Ivan, super travail. On peut toujours compter sur toi pour apporter des innovations su...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
AndyB72 Caricato ora sulla V12, nessun errore.
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
Iván perfect!
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
9 months 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,...
Bernard13 (Je réécris mon commentaire -français- en français car certains mots ne correspondaient pas ...
Iván 1000 indicateurs !!! brutaux
Lean Me parece muy buen indicador, y se complementa muy bien en mi sistema, ¿podrías crear un scr...
Iván Gracias! Para el screener sólo tienes que copiar el indicador y poner como condición de búsq...
Lean Muchas gracias Iván, ya lo he podido crear.
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
10 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...
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.

Top