# Trend Chaser 3.0 with Money Management

I have been working on the Trend Chaser concept for some time but always had a problem with false signals, large draw-downs, and sub-optimal stops. Â It had value in that it averages 50% wins on most instruments with most time-frames, so I felt it was worth persevering.

I am indebted to cfta’s idea for grid-step trading and Nicolas’ assistance and development of the code for a brilliant money-management system, as wellÂ a number of traders (and my close friend Free2Trade) for their encouragement and ideas. Â  I have been able to find aÂ solution to these problems through theÂ incorporate the money management code with the Trend Chaser code.

It is early days in the testing but so far the results have been spectacular. Â I have attached a spreadsheetÂ of the test results I have run on major indices, with the optimisation of some of the money management parameters: standard deviation (line 73), risk/reward (line 11) and risk percent (line 9). Â Please note that the formula in the spreadsheet are:

1. Â ME (mathematical expectancy) = % of winning trades x average gain of winning trades /Â average loss of losing trades – (1 – % of winning trades).
2. Â IRR (internal rate of return or compounded return per annum) = 360 x (((end \$ / start \$) ^ (1 / (end date – start date)) – 1)).
3. Â  This is a way to compare trading systems with different time frames, starting accounts, outcomes, etc.
4. Â  I have rejected ME’s < 0.5, and % wins < 50%.
5. Â  The max. DD (max. draw down) is expressed in \$’s but the percentage is the dollar amount divided by 100.
6. Â  I have noticed that the max draw-down figures given by PRT don’t seem to bear any relationship to the reality of the charts. Â Does anyone know how this is calculated?

I find that the sweet spot for the code is in the shorter time frames such as 5 and 1 minute charts. Â The last two tests of the DAX were spectacular as I ran them over only the opening hours for that market.Â  Â The negatives were the draw-downs of 11% and 17% – worth the risk, Elsborgtrading????

I have attached the code for examination and critique, please. Â All comments and suggestions for improvement are most welcome.

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. • 315 days ago #

Syntax error: The function “MGC-Coppock” called from “Trend chaser supertrend” does not exist.

2. • 314 days ago #

Sorry Frank, substitute COI = WEIGHTEDAVERAGE[14](ROC[11]+ROC[10]) for the MGC-Coppock line.

Please post your other emailed questions to the forum. Â Thus, if I can’t answer them, someone else might be able to.

3. • 314 days ago #

Thanks Mike,

When I was about to test it on live account, the following message occured and the model stopped:

This trading system was stopped because the program used a negative or zero offset (ex: close[-10]) during the evaluation of the last candlestick. Please add protections to your code to prevent negative or zero offsets.

• • 314 days ago #

Hi Frank,

Same problem as last time. Â There is some change made to the code that I can’t locate without the code.Â

“The best solution is to go back to the original code and make one change at a time.”
4. • 304 days ago #

Hi Mike,

Great stuff, I really like to the code and it seems like a terrific filter for the grid system so feel free to discuss in my thread if you like ðŸ™‚

5. • 302 days ago #

Hi cfta, I have posted to your thread. Â The combination of the two systems needs a lot more testing, but I am having trouble fully understanding the logic of the code to test the alternatives. Â Thus the tests I have run purely optimise the the parameters. Â There is a spreadsheet of the test results on your thread.

6. • 276 days ago #

Hi MikeCG

i’ve problem to start theÂ  MGC Trend Chaser in 5min timeframe , because the backtest was really good . But the System gave me always an errormessage for an negative or Zero value for the last candle , i should put somewhere Â ” close[-10] Â . Do you know where i have to change the code ?

BR Michael

• • 275 days ago #

Hi Michael, please send me the code you are testing and I will track down the problem.

Cheers, Mike

• • 275 days ago #

Hi Mike,

i use the mgc-trend-chaser-160914.itfÂ exactly, starting thje backtest no problem . But i when start the code for
the real trading on the platformÂ  , exactly after 5 min the system is
interupted. With Advice to add some or change the code with ……
BR
Michael

7. • 272 days ago #

Hi Mike

Thanks for the work – am relatively new to PRT but wanted to ask in reference to what Zilliq and Sylvess have said about the conditions and your comment that you think the =1 represents ‘true’ (I’ve no idea btw!) I’ve been playing around with the code and running some ProOrders in demo and am getting orders but not sure they’re being best placed so just wanted to ask if you could clarify theÂ conditions/logic you are after please?

I know you’ve said it a few times above butÂ reading and re-reading some contradicts and I am not sure if you are after consecutively rising indicators or new highs/lows plus the COI is a Weighted Moving Average from what I understand so not sure how this could be less than zero (or I have totally misunderstood of course!) but it is not represented in the code (COI < 0) soÂ was hoping to better understand then have a go at coding what you are after in a different way (as per Zilliq and Sylvess comments) if you could perhaps explain please..?

As I say it is generating orders so perhaps the logic as you wanted it is already there and no need to re-code but would be up for having a go if any doubt! ðŸ™‚

cheers

Max

• • 258 days ago #

Hello @Michael,

My apologies for the delay in responding to your query. Â When ProOrder rejects code it shows a warning yellow triangle. Â Hovering the mouse over the triangle will tell you the problem. Â I need to test the actual code to see the problem and fix it. Â  I may be able to pick the issue with the details of the warning message, but the code would be better.

• • 258 days ago #

Hello @Michael,

My apologies for the delay in responding to your query. Â When ProOrder rejects code it shows a warning yellow triangle. Â Hovering the mouse over the triangle will tell you the problem. Â I need to test the actual code to see the problem and fix it. Â  I may be able to pick the issue with the details of the warning message, but the code would be better.

Hello @MaxT,

The code “HIGHEST[5](c1)=1” is saying look back 5 bars and pick the highest bar that complies with condition c1. Â Condition c1 is that the Coppock for that bar is higher than the Coppock for the previous bar. Â If this is true (=1), and all the other conditions are true, then do the following…..

I am looking for a confluence of the 3Â indicators and 5 conditions within 5 bars as a signal to buy or sell. Â If you want to test the efficacy of the code, remove the “HIGHEST” phrase and run the code reading “IF c1 AND c2 AND ……etc”. Â

There is no requirement in the code for COI<0. Â COI must be less than COI(1) for a short position. Â This means that it is sloping down from a high point.

I hope this clarifies your concerns. Â Let me know if I can be of further assistance.

Cheers,

Mike

8. • 255 days ago #

Hi Mike

Many thanksÂ starting to make a bit more sense now and also seen the same code used in other strategies on here/understand you are merging ideas etc.

Also wanted to confirm- the 3 .itf’s posted here – the MGC is your supertrend v2.0 using the supertrend indicator for sl/tp and the Trend Chaser v3.0 is the same as the Trend Chaser v3.0 with MM just that you have made the sd parameter more convenient at the top of the code in the MM version?

And the grid ordering only works when cumulate orders are set to true but the money management is what is calculating the sl/tp yeh?

cheers

Max

9. • 253 days ago #

Hi Mike

I see the HIGHEST[5] condition comes from cfta’s post ‘Grid orders with…’ but he states he doesn’t think he’s quite got it figured out (and I think he/Zilliq/sylvess are right… or rather ‘wrong’ ðŸ˜‰ cannot post there though for some reason)

I created new code using onlyÂ the MAC and thisÂ HIGHEST[5] and it does not enter positions according to last 5 bars continuously rising

Also assuming it did work correctly then it makes sense checking the COI, MAC and STO this wayÂ but you are also ‘asking the same’ of conditions c3, c4, c13 and c14 which doesn’t make sense/these conditions are only that the STO is greater than or less than a figure and not continuously rising (unless you are trying to ‘ask’ that they have remained above/below these figures for the last 5 bars?)

Probably not the most elegant way/bit long winded but the attached ‘works’ for continuously rising/falling over last 5 bars (but a trade can be entered then immediately exited the next bar if MAC continues to rise/fall for 6th bar whereas I think the idea would be to ‘reset the clock’ once a position had been entered…? Not sure how to achieve that though…!)

``````/// Definition of code parameters
DEFPARAM CumulateOrders = FALSE // Cumulating positions deactivated

MAC = MACDline[12,26,9]

// Conditions to enter long/exit short
EL1 = (MAC > MAC[1])
EL2 = (MAC[1] > MAC[2])
EL3 = (MAC[2] > MAC[3])
EL4 = (MAC[3] > MAC[4])
EL5 = (MAC[4] > MAC[5])

// Conditions to enter short/exit long
ES1 = (MAC < MAC[1])
ES2 = (MAC[1] < MAC[2])
ES3 = (MAC[2] < MAC[3])
ES4 = (MAC[3] < MAC[4])
ES5 = (MAC[4] < MAC[5])

//Enter long
IF NOT LONGONMARKET AND NOT SHORTONMARKET AND EL1 AND EL2 AND EL3 AND EL4 AND EL5 THEN
ENDIF

//Enter short
IF NOT LONGONMARKET AND NOT SHORTONMARKET AND ES1 AND ES2 AND ES3 AND ES4 AND ES5 THEN
ENDIF

//Exit long
IF ONMARKET AND ES1 AND ES2 AND ES3 AND ES4 AND ES5 THEN
SELL AT MARKET
ENDIF

//Exit short
IF ONMARKET AND EL1 AND EL2 AND EL3 AND EL4 AND EL5 THEN
EXITSHORT AT MARKET
ENDIF``````

• • 253 days ago #

Hi Max,

The 5 bar look-back only checks that the condition was fulfilled in the last 5 bars. Â Your idea to check that it is continually rising/falling is good, but the entry point is when, during the last 5 bars, there is a change in the indicators. Â I have found that it is the turningÂ point that is more accurate. Â How did your tests work out?

And the answer to all your questions from 2 days ago is “yes”.

Let me know how you go.

10. • 253 days ago #

Aha! I think that was when it was entering in my tests – on a change so I guess it is working as intended! *blush* ðŸ™‚

Many thanks all very helpful figuring out how this is working – haven’t run any tests along the way I just posted but have hadÂ a few proorders running in demo mode with some good results using your original code so perhaps I will just stick to that! ðŸ™‚

cheers

Max

11. • 224 days ago #

Hi Mike,

Thanks for your great code! It is working great on backtests, but I want to test it on demo and it doesn’t work.

12. • 172 days ago #

?Hi,

what is the latest code for these strategy ? thanks

13. • 171 days ago #

Hi @volpiemanuele,Â the only new code is that which I have optimised. Â Now a word of warning, most automaticÂ trading systemsÂ are quite complex with lots of variables. Â If you get a spectacular result in back-testing, it does not mean that you will get the same result in ProOrder. Â You need to forward test in ProOrder in demo mode for some time to be sure the code will produce a satisfactory result when run live. Â And even then there is no guarantee.

Read @cfta posts for a good strategy for using ProOrder safely. Â I don’t think it is a “set and forget” opportunity. Â It really needs supervision unless someone is clever enough to create some self-optimising code.

14. • 100 days ago #

Â Thank you Mike, very interesting job, seems quite peculiar with respect to all the strategies I have seen on this forum so far, but maybe Its because I’m just a beginner.

Results looks pretty good though.

15. • 100 days ago #

Correct me if Im wrong, the idea is to use the Trend Chaser in 1 minute Â time frame. Turn it on and then take a profit as soon as the trade capture the short term trend, take a profit and re run it.

Is that right?

16. • 100 days ago #

Correct me if Im wrong, the idea is to use the Trend Chaser in 1 minute Â time frame. Turn it on and then take a profit as soon as the trade capture the short term trend, take a profit and re run it.

Is that right? Because otherwise from what I see in the recent past in the 1minutes TF it doesnt switch positions

17. • 58 days ago #

Does anyone have this updated code? or tested in demo?

18. • 56 days ago #

Hi Mike.

Thanks for sharing the code.

Whit which indexesÂ do you recommend to use it and in which timeframe? Only 1 min or also in other TF?

Thanks

19. • 55 days ago #

Hi All, apologies for the late response to your queries. I have been away and have not been trading for some months.Â

I posted the code I have used manually with some success, in the hope that someone might develop it further to the point that it could be run successfully in ProOrder. This has not happened and my trials in PO were not exciting.Â

My manual operation of this system works about 50 % of the time and depends on manual money management to make a 3:1 reward to risk.Â

I can’t tell you how best to use a system because everyone has a different style of trading. Â Take the ideas, play with them and develop your own style that works best for you.Â

On that note I would like to close this post and will not be following it in the future.

Thank you for all contributions and your interest. May you develop a successful trading system.Â

Register or

#### Likes

+4 more likes

Related users ' posts
gabri
2 weeks ago
5
Indicators
Franz, can this code work for you? count=1 i=0 j=i+1 tot=0 //calcolo 3 barre while co...
Hi, can you show at least one strategy that works well with this indicator? The idea is nic...
Francesco, I just tried to code an idea fromÂ Maximus 78 (https://www.prorealcode.com/topic/...
Nicolas
1 month ago
v10.3
16
Indicators
Hi - have come across a difference here in the calculation of the indicator. It's meant to r...
I don't know, the code of this indicator is one from another platform, not the Three Line Br...
Ok, many thanks. I've tried messing around with the code myself but am no closer to solving ...
gabri
1 month ago
4
Indicators
GraHaL, I cannot see any link attached. I mostly manual trade but for stocks with strong fi...
Yes sorry, I set up a link to a screen shot on my google drive and then I got locked into th...
Francesco78
2 months ago
0
Strategies
balance
2 months ago
1
Indicators
Balance thanks for sharing this excellent indicator.Â  HereÂ are some thoughts. Â please ad...
bjoern
3 months ago
7
Strategies
Also change the ATR multiplier to 2 instead of 3. Slightly better drawdown.
Hi Everybody, when I look at the strategy I felt the need to implement a Moneymanagement-Sy...
LUCASSEN
4 months ago
3
Indicators
amplitude 1.2.3Â  = ( 2-6-30 ) or (1-1-27) ?
Hallo Supertiti Macd amplitude=1-1-27Â Â Â  andÂ Â  Â prc halftrend triple in Heikin AshiÂ  grafie...
Thanks you so much Lucassen
Nicolas
6 months ago
v10.3
14
Indicators
Have you ever made any Franc with trading ? I guess, not. Maybe I should change business and...
Everything here is free, I do not sell anything and "tell people what they like to hear", I'...
Is there such a thing as a free lunch ?
Maz
6 months ago
v10.3
3
Indicators
blue = 50 green = 20 red = 10 than you
Is there an easy way get a value returned from the indicator that says if the blue channel i...
Hello, How can i project it on the chart? Now it is below amongst the other indicators.. ...
tasciccac
8 months ago
1
Screeners
Thanks for contributing to the "ichimoku section" of the prorealtime code library Don't he...
1 year ago
4
Strategies
The reasons why I think it's time consuming and we loose time to try to do backests and Auto...
Hello Zilliq, You don't need a system to produce a walk forward test. You can easily create...
It is incredible! Thanks for sharing, Doctrading!
1 year ago
2
Strategies
Thanks for sharing. This strategy is flat for 11 years and winning afterwards. Don't you thi...
Hello, As I usually say, strategies are exposed to be improved :) So yes, I think there mu...
1 year ago
0
Indicators
1 year ago
2
Strategies
Hello, Someone asked me something (his results seemed to be different) on my email, but it ...