How do I stop my trend system from giving signals during ranges?

aparoid89

Active member
146 1
My system works well when backtested on the last 25 years of FTSE 100 data but when I test it on something that doesn't trend a lot like BP plc then it ends up making a loss after the 25 years. It's an adaptation of the 3 ducks method for UK stocks but with the daily, weekly and monthly charts as the 3 'ducks' instead of 5 min 1 hour and 4 hour.
 

trendie

Legendary member
6,551 1,138
can you quantify mathematically, or in terms that can be algorithmisised (??) what constitutes a range?
 

aparoid89

Active member
146 1
Probably using its proximity to a previous resistance but I don't know if that's what other people who are in a similar position have done. That's why I ask.
 

Brumby

Established member
593 139
My system works well when backtested on the last 25 years of FTSE 100 data but when I test it on something that doesn't trend a lot like BP plc then it ends up making a loss after the 25 years. It's an adaptation of the 3 ducks method for UK stocks but with the daily, weekly and monthly charts as the 3 'ducks' instead of 5 min 1 hour and 4 hour.

There are generally three problems as I see it :

1)All back tests work well because they tend to be curve fitted.
2)You back test on FTSE but expect some degree of correlation to BP plc. Isn't that apples and oranges?
3)Your backtest was over a 25 year period but as they say "the devil is in the details." Without context it is difficult to make judgment unless you are prepared to wait another 25 years to finally draw a conclusion.

False signals are part and parcel of all non discretionary systems. You take the good and the bad that goes with it. Basically you can't have the cake and eat it too.
 

aparoid89

Active member
146 1
There are generally three problems as I see it :

1)All back tests work well because they tend to be curve fitted.
2)You back test on FTSE but expect some degree of correlation to BP plc. Isn't that apples and oranges?
3)Your backtest was over a 25 year period but as they say "the devil is in the details." Without context it is difficult to make judgment unless you are prepared to wait another 25 years to finally draw a conclusion.

False signals are part and parcel of all non discretionary systems. You take the good and the bad that goes with it. Basically you can't have the cake and eat it too.

I just want it to be able to know when it is trending and not to generate signals when it is in a range.
 

Outside_The_Box

Junior member
12 1
Well, it's not that you need it to not give you signals, it's just that you need to know when to employ your system and when not to employ it. Trend following systems break down when the market ranges, just as range trading systems break down when the market trends. If you want to use your trend following system, then just use it on trending markets. If you want to trade ranging markets then you'll need to develop a range trading system. Deploy each as needed.

I suppose it is possible, in theory, to develop an alert system that will not alert you during ranges by say, filtering out signals when the ATR/ADR is < X, but that depends on your software's capability. I don't know what you use, so I couldn't comment any further on that...
 

aparoid89

Active member
146 1
Well, it's not that you need it to not give you signals, it's just that you need to know when to employ your system and when not to employ it. Trend following systems break down when the market ranges, just as range trading systems break down when the market trends. If you want to use your trend following system, then just use it on trending markets. If you want to trade ranging markets then you'll need to develop a range trading system. Deploy each as needed.

I suppose it is possible, in theory, to develop an alert system that will not alert you during ranges by say, filtering out signals when the ATR/ADR is < X, but that depends on your software's capability. I don't know what you use, so I couldn't comment any further on that...

I use python so pretty much anything is posible
 

Brumby

Established member
593 139
I just want it to be able to know when it is trending and not to generate signals when it is in a range.

We all want that whether we trade discretionarily or if we automate a system. This problem has been around as long as trading has been around. There are generally two ways to deal with it. Learn to become a better trader or continue to invest in a better system but regardless you will have to learn to live with false signals unless you quit trading.

You can apply discretion to your signals but don't expect a system to perform any better than your own ability to filter correctly.

Alternatively you can use a system filter but the drawback is often late entry and/or fewer trades. You will have to run the back test to determine whether it will provide you with better results then without the filter.
 

Dinos

Veteren member
4,112 713
Have you tried incorporating Heiken Ashi Candles., IMHO they are easier to interpret and show when the prices are trending.
 

NVP

Legendary member
37,584 2,008
My system works well when backtested on the last 25 years of FTSE 100 data but when I test it on something that doesn't trend a lot like BP plc then it ends up making a loss after the 25 years. It's an adaptation of the 3 ducks method for UK stocks but with the daily, weekly and monthly charts as the 3 'ducks' instead of 5 min 1 hour and 4 hour.

a system that posts a loss when it isnt trending ?.........welcome to trading :cool:
 

bbmac

Veteren member
3,584 787
If you can't stop your system/edge generating trend following signals/set-ups in a range then you have to recognise when to act on those signals/set-ups and when not to - ie in a trend not a range - via a rule set for determining such.

I trade an edge that produces both with trend and counter trend set-ups but have a rule set for when to act on each ...and in the case of the with trend set-ups only act on them when price is trending on the relevant t/f's per such a pre-determined rule set

G/L
 
  • Like
Reactions: x4x

Lax_Van_Dumb

Member
63 5
Have you seriously gone back 25 years of FTSE? What were you doing working off a monthly or a 3 monthly chart? If you had a computerised version do this for you it is a forked up flawwwed anal-ysis. Tha I can say for defffff.
 

aparoid89

Active member
146 1
Have you seriously gone back 25 years of FTSE? What were you doing working off a monthly or a 3 monthly chart? If you had a computerised version do this for you it is a forked up flawwwed anal-ysis. Tha I can say for defffff.

Why is it flawed? I used the monthly chart
 

aparoid89

Active member
146 1
Quick update, using some ninja coding skills I just downloaded all the data of all the ftse 100 companies from yahoo finance in 3 minutes without needing to know the name of any company. Pretty tired now so I'm going to run my algorithm on all 100 companies tomorrow and see how many are profitable.
 

trendie

Legendary member
6,551 1,138
Quick update, using some ninja coding skills I just downloaded all the data of all the ftse 100 companies from yahoo finance in 3 minutes without needing to know the name of any company. Pretty tired now so I'm going to run my algorithm on all 100 companies tomorrow and see how many are profitable.

good luck with your research.
good to see a positive, learning attitude, rather than asking for things on a plate. (y)

as an exercise, you could just run your algorithm on the first 7-8 years, see which ones are profitable, then run on what remains of the 25 years data.
And then see if your "profitable" ones remain profitable over an extended time.

I don't know if you have optimised the settings for your signals, but then tweak them and see if the results are wildly different. (unless you have already tested for robustness, ie, a small change doesn't give rise to an unusually large difference in returns)

I think your hard work will pay off.
As an aside, I got round the whole trend/range problem by assuming that if price has started to contract, and the highs and lows are within a defined range, I treat the market as now in breakout mode, and trend-mode is off.
However, I have to suffer a couple of losses before I look deeper.
 
 
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock