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
luiskohnen Parece un excelente indicador, lo voy a analizar. Muchas Gracias
Iván De nada!
Iván
3 weeks 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.
Iván
1 month 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
2 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...
Iván
2 months ago
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...
Bateson
4 months ago
MACD Reloaded
MACD Reloaded
2
Indicators
NEOMKEY Nada nuevo
Carlose I love your version of the MACD, if you use it you can get a lot of use out of it, for me ma...
winnie37 bonjour, une petite idée d'ajout mais que je ne saurai coder, ajouter au stop loss un break ...
sfl This is dangerous, did you see aug 2023 ? I would not run live this algo, need more daata to...
winnie37 could you post the backtest please ?
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
Matriciel Very nice job ! Is it possible to do the opposite because what interests me is to have the ...
YvesRobert Hi Matriciel, how can we do this, because stochastic is limited between 0 and 100 but price ...
Traderfox06 Dear zeiiermantrading, I really like your approach combining adaptive averages with MACD in...
jacquesgermain Hello IASD it's normal , when this occurs, uncheck RSI and MFI line and click then the MAC...
emiliobercial Thank you very much for sharing!
Carlose estoy de acuerdo con IASD Esta muy bien el MAD y el indicador en el precio no se ven bien...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas Simple strategy with this indicator is available here: https://www.prorealcode.com/topic/ut-...
FXtonio Nicolas.... MERCI 1 millions de fois, cet indicateur gagne dans 75% des cas en scalping m1 ...
davy42 bonjour, à quel moment apparait le fleche, à l'ouverture ou la fermeture de la bougie? merci
Nicolas
8 months ago
B-Xtrender
B-Xtrender
7
Indicators
Fgats I suspected something like this but in the PRT documentation I couldn't find anything to exp...
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à :)
JS
8 months ago
Trendilo
Trendilo
0
Indicators

Top