# Looking for and testing short term patterns in the market



## professor_frink (6 July 2010)

Morning all,

Not sure how many people here use this type of analysis or not, so thought I'd throw something out there and see what bounces back

One thing that seems to get thrown around the forum quite a bit is to test out patterns and ideas before putting them to use. Even if you are a discretionary trader, extensive testing and investigation is an absolute must for short term trading. Whilst I have my own set of triggers to enter a trade which doesn't generally change that much, I'm also running the kind of analysis that'll be outlined below to help fine tune things/ find a bias for general market direction/keep track of the way the market is changing over time.

General idea is this: find a pattern/point of interest in price,volume,range, breadth,etc and then test it out as a buy signal. Instead of looking at a pattern and using a predefined exit to go along with it, the performance of the market following the pattern is logged to get an idea of what can be expected.

Generally, I'll use amibroker for this type of thing, but there's no reason why it couldn't be done in excel either.

So, onto a basic test. If we have a look at Friday's bar for the S&P500, we can see that it was an inside day(see chart here). So our first test will be to see if an inside day has typically lead to any strength or weakness in the past. So we will code up an inside day and run it as the buy signal by itself, and see how the market has performed 'x' amount of days out from one. Results below:




The left hand column is the number of days after an inside day has occurred, the rest should be self explanatory(for those who don't have ami, the payoff ratio is simply the avg win loss ratio).

Whilst that is interesting, we need something to compare it to. It's all well and good to say that 5 days out from an inside bar, there is a 55% chance that the market will be higher than it is now, but how does that compare to any old 5 day period? Results for that below:



If we look 5 days out here, results are pretty similar. Comparison of the two tests below:



There really isn't that much of a difference there at all. By itself, the inside day doesn't really add any kind of value as a standalone indicator of upcoming strength or weakness.

Another way of looking at these types of things that can impact on the results is the general positioning of a bar relative to where the market has been recently. Is the pattern occurring at a relatively high or low level? Are we in an uptrend or a downtrend? And on and on we can go. So for a few more tests to look a little further. In this instance, we have had an inside day that has occurred after the market was printing new lows. So to investigate further we'll go and test it out.

The next test:Today was an inside day after the market traded at it's lowest price over the past 20 bars yesterday. Buy today's close. Results out 'x' days from the signal below(the benchmark average  on the right)




What stands out here is the relative outperformance immediately following this pattern, and that it falls away after that. Whilst I wouldn't exactly classify this as a strong upside edge for the following few days, it is slightly better than average over the short term and worth noting. The fact that it falls away quite quickly after that is also worth paying attention to.

To continue on looking at the positioning of the market, lets have a look at how an inside day performs at a relatively higher price. This next test will look at how the market performs after it made a fresh 20 day high before the inside day. I've left the test at a low point next to it, and the random average on the right to help compare:



Now it's starting to look interesting. Whilst the test for an inside day at new lows shows the potential for some strength immediately before returning to not being any kind of a signal at all, when it happens after the market makes short term highs, we can see slight underperformance 1-9 days out, before it outperforms the average from 10-20 days.

Have hit my attachment limit, so will post the rest in a minute.....


----------



## professor_frink (6 July 2010)

So we have a pattern that by itself is of no real interest, starting to show some differing results when looked at in different ways.

So the question then becomes why? 

The inside bar by itself doesn't really show much in the way of performance(good or bad), so  the difference in performance could have come from looking at the general positioning of the market at the time. To test that out, let's run a test with no individual pattern on any one bar, and have a look the general positioning of the market. If a test on the way the market behaves solely based on where it's currently positioned shows similar results to the prior test that combined market position with the inside bar, then we'll know that the inside bar is not worth paying any attention to whatsoever.


The next test: Today we printed a fresh 20 day high or low. Results out 'x' days below:




So we can see here that there is a fair difference in the way the market generally performs here. On face value it would appear that if you have a timeframe of 1 day to 4 weeks, then you'll be better off looking for short term weakness instead of looking to buy breakouts(that's another topic altogether though). Whilst this is all very interesting, it doesn't fully explain the results when combined with the inside day study above.

The chart below compares buying an inside day after a 20 day low with just buying any 20 day low:




Once again, it's showing the potential for short term strength, and longer term mild weakness, even when compared with buying any old short term low. So there may actually be something to it

And now on to comparing high prices:




This is also showing up some interesting results. When you see a new 20 day high being printed, the expectation was for the market to underperform, but when the market makes a new short term high and then pauses by printing an inside day, this underperformance only seems to be in the short term before it begins to exhibit some fairly decent follow through.

So here we are after running a couple of tests on a rather basic chart pattern and looking at it from a couple of different angles, and there are a couple of interesting patterns/scenarios to look out for.


Hopefully my ramblings here have made sense

All thoughts, comments and criticism welcome


----------



## tech/a (6 July 2010)

Interesting Prof

Some input from me.

Inside days which follow very high volume are the ones to be interested in.
Once the inside day is printed THEN (Regardless of wether the inside day is on an up or down bar) A long trade is taken if the high is taken out and a Short trade if the low is taken out---stops are at the opposite end of the inside bar - 1 tick.

Can you test this?


----------



## professor_frink (6 July 2010)

tech/a said:


> Interesting Prof
> 
> Some input from me.
> 
> ...




Probably couldn't test it out down to that kind of accuracy tech, my coding skills are rather average

Just to clarify a little, this type of analysis is largely a supplement to my regular trading(which is still a discretionary method), I'm looking at generating a hypotheses here, not trying to build a mechanical system.

Good that you mentioned volume though, as it does come into play quite a bit, and something I'll get into a bit later on. I didn't mention it or include it at all for the posts I made today, I was mainly trying to demonstrate the basic process involved and then see how things develop from there based on any response.

Cheers


----------



## brty (6 July 2010)

Interesting Prof.

I find inside days useful after a run in prices. In your testing you are testing just 20 day highs and 20 day lows, however how it actually gets to those lows may reveal some interesting results. For instance if the new 20 day low was after only 3 or 4 days down, ie a big move, may have totally different results to something that has been going down gently for the last 10-12 trading days.

In other words is the inside day just a breather in a fast downwards move or is it at the exhaustion of a slow move. My research shows there is a big difference, but it is not done on a computer, maybe you could work out how to test it. I'm not very computer literate.

brty


----------



## professor_frink (6 July 2010)

brty said:


> Interesting Prof.
> 
> I find inside days useful after a run in prices. In your testing you are testing just 20 day highs and 20 day lows, however how it actually gets to those lows may reveal some interesting results. For instance if the new 20 day low was after only 3 or 4 days down, ie a big move, may have totally different results to something that has been going down gently for the last 10-12 trading days.
> 
> ...




An interesting take brty, and I definitely agree with you, how the market behaves leading up to a particular pattern(not just an inside bar) can have a dramatic impact on how a market behaves going forward. The example I gave earlier(putting the inside bar into context of how the market is positioned prior to it happening) was an attempt to illustrate something similar 

Additional layers, such as the Rate of change of the preceeding few bars leading up to the inside bar would be one way of looking at this in a little more detail. Might be something to put on the to do list for the time being and have a look at later on.

Before this turns into a thread about inside bars, I'll throw something else into the mix.

When we made fresh lows last week, it was the 9th consecutive close that we had made below the 5 period moving average. Downside momentum like this without any kind of rally is something that we don't see to often.

Here's a little setup that I've basically copied off Rob Hanna over at Quantifiable Edges

Discussion on his time stretch system:

http://quantifiableedges.blogspot.com/search/label/Time Stretch

Basic setup I'll show here is this - we have just made a fresh 20 day low, and price has closed below the 5 day MA for the 9th consecutive day. Buy at the close of price on the 9th day, and sell when price closes back above the 5 day MA. Results are from 1990 until now, and it also has a 3 day time exit attached to it, ie if the market doesn't snap back quickly, then head for the hills!

Results below



What's interesting to note here, is that there have only been 19 times in the past 20 years where there has been such downside momentum in the market. With nearly 75% winners, this "system"(which I would never actually trade) is suggesting that there is a bounce coming. Considering that the average winning trade is in the market for less than 3 days on average, it's only looking for a short term bounce, and that's all that comes a lot of the time too.

This little number also lines up with the look at inside bars I went into this morning too: It looks like there is the distinct possibility for a bounce here, but both studies show that any bounce may be a short lived one


----------



## professor_frink (7 July 2010)

Have been having a look at the charts from last night, wasn't exactly an awe inspiring performance after the US open!

Looking at the SPY, and found that a gap and fade day like we saw last night coming off a recent low hasn't exactly shown much in the way of bullish tendencies going forward. Chart below showing results:




What was interesting though was when you filter the results based on volume. Out of the 30 results above only 8 of those gap days have occurred on higher vol than the day before. Of those 8 instances, 7 of them were trading higher after 3 days. So the bounce still may be on, but isn't exactly looking strong here.


----------



## tech/a (7 July 2010)

professor_frink said:


> Have been having a look at the charts from last night, wasn't exactly an awe inspiring performance after the US open!
> 
> Looking at the SPY, and found that a gap and fade day like we saw last night coming off a recent low hasn't exactly shown much in the way of bullish tendencies going forward. Chart below showing results:
> 
> ...




Ill throw something at you.
Open of trading has people covering O/N positions so if it was weak then longs will be covered so lots of selling.
If its likely to continue long then selling will be muted so fading that would be even more likely than fading high volume
The givaway today was the near Double top and the open low being taken out.
Subsequent lower lows just keep mounting up.
Ive been short again since 4260.
Will remain there.


----------



## nomore4s (7 July 2010)

Good idea for a thread Prof. 

I used to do quite a bit of this type of testing on the XAO/BHP/RIO/CBA when I was trading stocks and the SPI more often then I am now but unfortunately I'm out of touch with most of it atm and it will take me a while to dig it all out. 

I tested quite a few different things, how price reacted after: 
3,5,10 days up/down in a row 
certain % moves
moves to/from certain indicators I use
And a range of other patterns or ideas.

I then added different filters like overall trend, short term trend, exits after 1,3,5,10 days things like that as well as ideas around my custom built indicators. It is amazing how results change when certain filters are added.

While it didn't provide me with a lot of specific trade set ups (although I did get a few), it did provide me with invaluable information about how the market moves which would give me a heads up to be looking for longs/shorts or when to be giving certain patterns a miss.

Most people get caught up looking for specific patterns to trade without really having an understanding of how other market conditions affect that particular pattern and end up trading a pattern that might have a 70-80% win rate in certain conditions when it has only a 20-30% win rate in not so favourable conditions.

IMO understanding how the market moves is more important and beneficial then looking for Head & Shoulder patterns, triangles and all the regular TA crap that doesn't really provide any sort of decent edge.


----------



## Timmy (7 July 2010)

Good thread prof.  
I am a little concerned you are taking up bandwidth with a thread not dedicated to bashing the PM, but I'll take it .



professor_frink said:


> Not sure how many people here use this type of analysis or not, so thought I'd throw something out there and see what bounces back




Must admit this sort of thing is not my cup of tea.  It has been successful for many people though, Toby Crabel comes to mind.  Anyway, some disjointed thoughts follow, read or disregard as you see fit.

Have a look at popular patterns and what are the results if you fade them?  Some books are very popular and promote certain patterns as being reliable and profitable etc.  Might be helpful to actually test these patterns, see how reliable and profitable they actually are, and if fading them is more reliable and profitable.  I am also a fan of the short-term … patterns can ‘work’ if you don’t slavishly follow a ‘let-your-profits-run’ rule (apologies to all for the sacrilege, I will wear a hair shirt and abstain from chocolate for a month because of this outburst), or trade in and out of the position while the momentum ebbs and flows in your direction (this is really easy to say ).

The other thing that comes to mind is to look at the really, really, really popular patterns (head and shoulders, triangles, wedges, the sort of thing you find in the books from Guppy, Bedford, etc.) and see how the market responds to these patterns.  Failed head and shoulders, for example, can be a tremendous source of information about what direction the flows are in the market.


----------



## professor_frink (8 July 2010)

nomore4s said:


> Good idea for a thread Prof.
> 
> I used to do quite a bit of this type of testing on the XAO/BHP/RIO/CBA when I was trading stocks and the SPI more often then I am now but unfortunately I'm out of touch with most of it atm and it will take me a while to dig it all out.




Cheers mate, look forward to hearing some alternate views on this type of thing



Timmy said:


> Good thread prof.
> I am a little concerned you are taking up bandwidth with a thread not dedicated to bashing the PM, but I'll take it .
> 
> 
> ...




Timmy, feel free to bang in some PM bashing comments if you want, but being the strategies forum and considering the theme of this thread, you need to test out your ideas. Good luck getting past the security guys in the caravan:**

**disclaimer: I in no way condone the hitting of a woman, no matter what the colour of her hair is

Haven't tested out any of the more traditional/popular patterns like the ones you've mentioned, honestly I wouldn't know where to start when it comes to coding up something like a H&S or a triangle:dunno: Would love to see some results from anyone who has though.

I'm much more likely to view, say, the break of a down sloping triangle thingy-ma-jig as a break to new 'x' day lows('x' changing depending on what kind of state the market is in, hope that makes sense) and test from there. Partly due to me predominantly trading indicies(or is that indexes??) and not really feeling comfortable with the lengthy stories about battles between buyers and sellers, or guppies and sharks, that accompany the description of these types of patterns, and partly due to my average coding skills.


----------



## professor_frink (8 July 2010)

Interesting day's trade on the US markets o/n. We've had a 2 day rally and have closed back above the 5 day MA, so the initial studies I posted in this thread aren't really valid going forward, neither of them really showed anything interesting going out more than a couple of trading sessions

Now, on to today's rally. It was up in the top ten for largest daily moves since the March 2009 bottom, which considering the amount of upside momentum shown since then, says quite a bit.

So, for a bit of testing. Firstly 3% up days.




Note the differences in performance highlighted going out a few trading sessions. The first test includes the recent rally, results are even more skewed to short term weakness if you run the test up to the 2009 rally without including it.

What stood out for me when having a quick look this morning was that we had a 3% up day without any considerable gap up to get it going.

So I filtered the results and had a look at 3% up days that didn't gap up by more than 0.5%. Today was the first time that's happened since March 09, and when it happened twice in March 09, the market was in the process of making a 20+% move in roughly 3 weeks

So to have a look at results of a 3% day where we don't gap up by more than 0.5% on the open:




Results start getting interesting. It would appear that there is the potential for today's move to exhibit some degree of follow through in tonight's session before we pause, and possibly selloff the following day.


----------



## brty (8 July 2010)

Nomore4s,



> Most people get caught up looking for specific patterns to trade without really having an understanding of how other market conditions affect that particular pattern and end up trading a pattern that might have a 70-80% win rate in certain conditions when it has only a 20-30% win rate in not so favourable conditions.
> 
> IMO understanding how the market moves is more important and beneficial then looking for Head & Shoulder patterns, triangles and all the regular TA crap that doesn't really provide any sort of decent edge.




One of the best statements ever written on this, in this forum, or any forum.

As an example, I use support and resistance in my trading, you find a lot of this in the literature, but never does the literature separate different types of support. 

I have/use what I call 'good support', it is bottoms in the recent uptrend. The time frame of 'recent uptrend' is hard to exactly define, a series of higher highs and higher lows in the time frame I wish to trade is how I actually use it. Instantly I have transformed a so-so technical tool into something that is differentiated into what performs better 'sometimes' (actually a lot of the time).
Then the trick is to work out when it performs better or worse. For me that is when something 'meanders' back to the support level, rather than accelerates to it, again working out how the market really works.

brty


----------



## skc (8 July 2010)

Nice thread prof... thanks for the effort.

I think there is a book called The Encyclopedia of Chart Patterns which detail common patterns and what probabilty of success (however that is defined in each case) for them. But this type of analysis/observations need three more ingredients before they become valid tradable strategies. 

1. Understanding the wider context where the pattern occur - bear market vs bull market, big events coming up that could fuel rallies / reverse trends, breath of advance, presence of gap etc...

2. Managing the risk - it's no different to trading seasonality. It's easy to calculate max adverse excursion, but quite another to find the right place for risk/reward.

3. Knowing when the strategy is no long valid - like the SPI tend to rise btw 4-4:30pm during a severe bear market, but doesn't seem to be doing that anymore... At what point do you draw the line?? https://www.aussiestockforums.com/forums/showthread.php?t=13387

Being able to run the analysis makes a good analyst. But it takes at least 3 more ingredients to make a decent trader. 



professor_frink said:


> What stood out for me when having a quick look this morning was that we had a 3% up day without any considerable gap up to get it going.
> 
> So I filtered the results and had a look at 3% up days that didn't gap up by more than 0.5%. Today was the first time that's happened since March 09, and when it happened twice in March 09, the market was in the process of making a 20+% move in roughly 3 weeks
> 
> ...




Very interesting observation. I am with you the absence of gap makes this 3% day significant. We are running into profit season and prices going up leading into the results is often telling...


----------



## professor_frink (8 July 2010)

brty said:


> Nomore4s,
> 
> 
> 
> ...




Just so I'm clear brty, you prefer price to meander back to the support, or accelerate down into it?


----------



## brty (8 July 2010)

Meanders prof.

Think of a car cruising down the road looking for a side street, or a place to u-turn, in the fog. If it is accelerating when it gets there, it is very hard to stop and turn, often goes to the next opportunity.

Yet if the same car is going very slowly, relative to its normal speed, then it is much easier to change directions.

brty


----------



## professor_frink (8 July 2010)

skc said:


> Nice thread prof... thanks for the effort.
> 
> I think there is a book called The Encyclopedia of Chart Patterns which detail common patterns and what probabilty of success (however that is defined in each case) for them. But this type of analysis/observations need three more ingredients before they become valid tradable strategies.
> 
> ...




Cheers skc, thanks for the post, all very relevant points

Have heard of that book but haven't read it, would be interesting to see how they tested it(if it's going through charts manually think I'll give that sort of testing a miss)


----------



## professor_frink (8 July 2010)

brty said:


> Meanders prof.
> 
> Think of a car cruising down the road looking for a side street, or a place to u-turn, in the fog. If it is accelerating when it gets there, it is very hard to stop and turn, often goes to the next opportunity.
> 
> ...




Cheers brty

I have found similar. In the US indicies, when looking at a set of consecutive falls as a buying trigger, results have been better in the short term(roughly 3-6 days out) when you look for the recent falls to be a smaller % than the previous one.


----------



## ThingyMajiggy (8 July 2010)

brty said:


> Think of a car cruising down the road looking for a side street, or a place to u-turn, in the fog. If it is accelerating when it gets there, it is very hard to stop and turn, often goes to the next opportunity.
> 
> Yet if the same car is going very slowly, relative to its normal speed, then it is much easier to change directions.
> 
> brty




Unless you see the guy who yanks the handbrake at high speed and it turns and goes back just as fast


----------



## tech/a (8 July 2010)

brty said:


> Nomore4s,
> 
> 
> 
> ...




A very important and misunderstood aspect of trading.

Nice hint brty

One of mine is finding old resistance acting as support and this one.


----------



## professor_frink (9 July 2010)

Afternoon folks,

not really much to add today, typical lazy Friday afternoon for me

The comments I made yesterday suggested that some follow through was possible last night, which came in a little stronger than I was expecting. Had already run some what if situations based on yesterday's look at 3% up days with the focus on what could happen if we do get the follow through, it suggested that we'll possibly underperform tonight and on Monday as well. The fact that we have risen for 3 consecutive days also fits in quite well with that general idea.

Semis and banks underperformed compared with the overall market indicies last night too, not by anywhere near enough to trigger any alarm bells, but does fit in with the possibility of a mild pullback tonight if there is a bit of follow through on that front.

Cheers


----------



## professor_frink (16 July 2010)

Howdy folks, been quite busy this week, and seem to have been getting distracted by other things whilst I'm on ASF so haven't updated this one for awhile.

Couple of warning signs for the rally in stocks at the moment. Firstly, currencies - have a look at a few of the AUD pairs, 2 risk on trades, the AUDUSD and the AUDJPY. AUDUSD is currently flirting with it's June highs, but looks to be hitting some resistance at the moment. 




AUDJPY is lagging behind and has sold off a little, and the 2 pairs that more reflect the risk off trade, the EURAUD and GBPAUD have both turned up in the past couple of sessions.

Bond yields moved down overnight as well. Chart of 10 yr yield below:




Considering the S&P is currently pretty overbought in the short term and is due for a pullback, might be time to pay attention to some of the warnings coming from other markets


----------



## tech/a (16 July 2010)

Interesting Prof.
The correlation of the seemingly uncorrelated.
Meaning against our Index.
There must be a lot of other examples as leading indicators around.
Gold/Crude--etc


----------



## professor_frink (16 July 2010)

tech/a said:


> Interesting Prof.
> The correlation of the seemingly uncorrelated.
> Meaning against our Index.
> There must be a lot of other examples as leading indicators around.
> Gold/Crude--etc




I have been talking about the US markets in this thread, but that does translate over to our index in a round about way. Asia does have a life of it's own, but the general theme is still the same.

Crude is another one that could have been included in the charts above FWIW. I always struggle a little with gold, because of it's safehaven status, it does flip flop in the way it moves in relation to everything else(sometimes correlated with general market moves, other times it flips over and does the opposite), all depends on the circumstances at the time. I often find that I'm a little late on picking up when gold is changing it's relationship to other markets, so tend to leave it alone(from an analysis perspective and a trading one).


----------



## professor_frink (16 July 2010)

Thought I should update things with a test after my ramblings earlier

Was an interesting pattern last night in the S&P. Chart of the SPY below shows it, and the past couple of similar days:candle formation, positioning compared to recent range(green line on the chart is simply the highest price over the prior 10 bars).




The test run was looking for a similar "tail" on the candle that occurred in the top 10% of the prior 10 bar range. Results below:




Looks like a half decent bearish edge 1-3 trading sessions out


----------



## Timmy (17 July 2010)

professor_frink said:


> Couple of warning signs for the rally in stocks at the moment ...  might be time to pay attention to some of the warnings coming from other markets




Nice call Prof., spot on.


----------



## professor_frink (17 July 2010)

Timmy said:


> Nice call Prof., spot on.




thanks Timmy


----------



## professor_frink (20 July 2010)

That selloff we had on Friday, a move down of 2.7%+ when we had been at a short term high wasn't something you see very often.

So for a bit of a look at what's happened in the past when this has happened:

Yesterday was the highest close over the past 2 weeks and today sold off by more than 2.5%. Results below




What's interesting is that despite the pattern showing the potential for short term weakness for a few days out from this happening, 11 out of the 15 times that we've seen this on the SPY, we closed up the following session.

So considering that we saw that overnight, thought I'd have a quick look at the times were we recovered after the pattern seen on Friday.

The next test is basically the same as the last, have just shifted the pattern back a bar and scanned for the times we closed up the day following it:




Would appear that weakness is still a possibility from here, especially for the next 1-2 days


----------



## skc (20 July 2010)

professor_frink said:


> Would appear that weakness is still a possibility from here, especially for the next 1-2 days




11 occurences over what time frame prof?

Do you think these sample sizes are getting a bit small?


----------



## professor_frink (20 July 2010)

skc said:


> 11 occurences over what time frame prof?
> 
> Do you think these sample sizes are getting a bit small?




It's on the SPY ETF so it's since 93.

The 11 instances above was based on a certain reaction to the pattern highlighted in the earlier part of the post from Friday's analysis that I posted this morning, there were 15 instances of the large fall happening on the SPY. 

As far as coming to any definitive conclusion, the sample sizes are quite small and not to be traded as a stand alone method. The market over the past couple of months has been throwing quite a few of these patterns that don't have large sample sizes, it's a sign of the times.

Here's slightly tweaked version I ran based on the first test in my post this morning:

Instead of looking for just the highest closing price over the 10 bars, I looked at either that happening, or just an intraday high, looked for a 2% fall instead of a 2.5%+ one and ran it on the index data going back to 1975:




Helps the sample size a bit loosening up the criteria and running it on index data with a longer history, and still looks for the same basic pattern: a short term rally that gets dumped hard. Tells a pretty similar story to the first test I posted this morning too


----------



## professor_frink (21 July 2010)

Interesting trading in the US overnight! Decent sized gap down, decent sized rally. At face value, it would be hard to interpret it as anything but bullish. 



Generally I find taking things at face value to be rather dangerous, so off I go to test it out

Firstly, the reversal bar. Today we gapped down below yesterday's low with a gap of greater than 1%, and then rallied to close up by more than 1%. Results below:




Few points - hasn't happened very often firstly. Results for the first few days after such a bar haven't been bullish at all, but once you look out by more than a week they can be interpreted as fairly bullish.  Not really worth looking at any variations on the basic pattern here as the results wouldn't yield much of a sample at all.

To try and get a bigger sample size, I've also run a test based on a gap below yesterday's low, and a close higher than the previous close. Still looking at the same general theme, just incorporating the less extreme examples into the test.




Obviously with a less extreme set of conditions we are going to get different results. But what's important here is that the theme for the test is still the same, and the theme within the results still comes out similar. There doesn't seem to be much to get excited about in the short term, but the prospect of higher prices further out does seem to be a possibility.

One other way of looking at today's action is within the context of an outside day. Today's was a rather extreme one, in that the open was below yesterday's low and the close was above yesterday's high

Results for that test below:




Once again it's telling a similar story. Looking at a few variations on this test- positioning relative to the past week's trading and volume today being higher than yesterday all say the same thing, there doesn't seem to be any significant edge in getting long right now, but we may see higher prices over the next few weeks.


----------



## tech/a (21 July 2010)

Prof

Some good stuff here keep it up--there are people watching even though your not getting much comment.
Are you using Amibroker for this testing?


----------



## professor_frink (21 July 2010)

tech/a said:


> Prof
> 
> Some good stuff here keep it up--there are people watching even though your not getting much comment.
> Are you using Amibroker for this testing?




Thanks tech, appreciate it

Yeah most of the stuff I do is with ami, the tables that I'm posting in here are just basic optimisations run through the backtester.


----------



## overit (21 July 2010)

Interesting thread. I have done a lot of work with short term candle stick patterns. Mainly on the currency markets though and shorter time frames. Unfortunately my coding skills are zip and I had to do it manually which is quite time consuming. My initial main source of ambition was to find patterns that would provide me a slight edge at 1:1 risk/reward. Anything consistently above 51% would be a winner replayed enough. Not as easy at it sounds. I found most technical analysis stuff is no better than random at 1:1. You have good runs and bad. Basically the spread kills you. 

This is one of the patterns I traded live. A thousand odd trades. I dont know what it is called. I would be interested to see it coded up and tested properly. It had a great run but then went into a big drawdown and I pulled the pin. The profit/stop was a 200sma of the ATR(1).




That enough about me. I am a little confused. Are you taking profit after X days? Can you try alternate profit stop methods for your patterns? Do you have a stop loss in place for testing? This may skew your results if you dont. ie it goes down stops out and goes for a win in allotted time.

I have a few candle patterns for you to test if you are interested.


----------



## professor_frink (22 July 2010)

overit said:


> Interesting thread. I have done a lot of work with short term candle stick patterns. Mainly on the currency markets though and shorter time frames. Unfortunately my coding skills are zip and I had to do it manually which is quite time consuming. My initial main source of ambition was to find patterns that would provide me a slight edge at 1:1 risk/reward. Anything consistently above 51% would be a winner replayed enough. Not as easy at it sounds. I found most technical analysis stuff is no better than random at 1:1. You have good runs and bad. Basically the spread kills you.
> 
> This is one of the patterns I traded live. A thousand odd trades. I dont know what it is called. I would be interested to see it coded up and tested properly. It had a great run but then went into a big drawdown and I pulled the pin. The profit/stop was a 200sma of the ATR(1).




Hi overit,

Haven't done too much testing on intraday currencies though have traded them quite a bit. What timeframe are you looking at? What pairs are you trading?  Is this a 3 bar pattern that is looked at coming off a low or high price, or one that you look at within the context of an already established trend? A bit more information here might help you get some answers from someone!




overit said:


> That enough about me. I am a little confused. Are you taking profit after X days? Can you try alternate profit stop methods for your patterns? Do you have a stop loss in place for testing? This may skew your results if you dont. ie it goes down stops out and goes for a win in allotted time.




I covered the basic outline of what I'm doing here in the first post



> Whilst I have my own set of triggers to enter a trade which doesn't generally change that much, I'm also running the kind of analysis that'll be outlined below to help fine tune things/ find a bias for general market direction/keep track of the way the market is changing over time.




It's not so much a question of taking profits after a certain time or stops for that matter. I'm looking at what's happening in the market currently, and then looking at how similar instances have performed in the past, with the goal of coming up with an expectation of things that could possibly happen.

Take yesterday's analysis I did on the US markets as an example. At a glance, it would appear that that particular days trading could be a decent reversal candle and signal a move up from here. When you have a look at the last test I posted yesterday, an outside bar like the one just gone has seen the market lose, on average, nearly half a percent over the next 3 trading sessions. The test still showed that, on average, the market has been higher 2 weeks after this pattern more often than not too, even with the possibility of short term weakness. In this instance it can serve as a signal to me to not go in long with anything close to a full position, as there is the distinct possibility that I'll get a better price in the coming days and can build a full sized position at a better average price, or to even sit back and wait for some more information that would confirm that being long is the way to be positioned.

Hope that helps.



overit said:


> I have a few candle patterns for you to test if you are interested.




I'm heading off for a few days and won't have regular access to the net or most of my software, but feel free to post up some patterns of interest if you want, either I can have a look at them when I'm back, or another poster on here might be able to help you out


----------



## overit (22 July 2010)

professor_frink said:


> Haven't done too much testing on intraday currencies though have traded them quite a bit. What timeframe are you looking at? What pairs are you trading?  Is this a 3 bar pattern that is looked at coming off a low or high price, or one that you look at within the context of an already established trend? A bit more information here might help you get some answers from someone!




I was just throwing it out there in context of the thread title and to give an idea of the 1:1 principle. Oddly enough you cant find much on the net about it which adds to my theory that if a pattern didnt have an edge at 1:1 then it really has no edge. My trading theory these days is based around what I learnt from testing these patterns in this way and what Peter Crowns and to a lesser extent his mate TheRealThing had to say over at the forex factory.

I mainly traded this pattern on the eur/usd 30min chart but I out of sample test everything on different timeframes and currencies. The pattern was traded whenever it happened, no bias. This was very difficult to trade. You had to put the hours in and be robotic. Although it ended in a death by a thousand cuts it taught me an enormous amount about timeframes, risk/reward, spreads, market volatility and following the rules.

My trading these days is based around patterns on support and resistance. Do I think my patterns by themselves have an edge. Not really. But it gives me defined entry and risk in an area that has the most potential to rebound and have a big run.

I would like to see the 1:1 results for all the candlestick patterns. I searched the net for these but only ever found what happened after _X_ days. If you found something which occurred frequently enough and punching above 50% success you can just keep punting (perhaps create a bot). Afterall thats what the casino does isnt it. Slight edge and repeat.


----------



## professor_frink (22 July 2010)

Hi overit,

You keep mentioning that you want to see a pattern have a greater than 50% accuracy with a fixed 1:1 risk reward ratio. Why do you think that this is important, and why would you prefer to see this instead of how a pattern performs simply by looking out by different amounts of days? 

Maybe I just need a proper explanation here, but I just don't get it


----------



## overit (22 July 2010)

professor_frink said:


> Hi overit,
> 
> You keep mentioning that you want to see a pattern have a greater than 50% accuracy with a fixed 1:1 risk reward ratio. Why do you think that this is important, and why would you prefer to see this instead of how a pattern performs simply by looking out by different amounts of days?




Sorry I am not good at explaining things and why I generally stay out of this type of thing.

Firstly any pattern with a 1:1 reward greater than 50% could be traded solely in this way. Extracting your edge by volume of trades. ie roulette.

Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself. I am not saying that it cant be used as an entry signal but that it would not be where your edge would come from. ie lets look at a pin bar. That candle is telling you the same thing no matter where on a chart it is placed. If I need to filter that candle by only trading it on support or resistance where is my edge... the pinbar or the support and resistance.




Is your real signal the candle formation (pinbar) or the break out of the low from that candle on the resistance line.

Oops time got away from me and I have to leave it there for the time being. Gotta go out. Something to think about anyway.


----------



## overit (22 July 2010)

overit said:


> My trading these days is based around patterns on support and resistance. Do I think my patterns by themselves have an edge. Not really. But it gives me defined entry and risk in an area that has the most potential to rebound and have a big run.




When it all boils down I think this is the greatest point I am trying to make. If a pattern is only 50% at 1:1  I see it as no better than random. But what it does is give you an entry and set risk in your place of interest then you let your exit sort the rest out.

The point I was trying to make with my diagram is that it was not the pattern that set up the run. Both those setups to me are exactly the same. It just depends on when the bar started and closed.


----------



## professor_frink (23 July 2010)

overit said:


> Sorry I am not good at explaining things and why I generally stay out of this type of thing.



Hi overit,

No need to apologise, everyone has a different way of looking at the market, all comments are welcome regardless of how well they are or aren't  explained. I think you explained it ok, I'm more struggling with the 'why' of it all

I should thank you as well, having questions like this help me to qualify why I do what I do, which helps me to spend a little time thinking about things more, which is never a bad thing



overit said:


> Firstly any pattern with a 1:1 reward greater than 50% could be traded solely in this way. Extracting your edge by volume of trades. ie roulette.
> 
> Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself. I am not saying that it cant be used as an entry signal but that it would not be where your edge would come from. ie lets look at a pin bar. That candle is telling you the same thing no matter where on a chart it is placed. If I need to filter that candle by only trading it on support or resistance where is my edge... the pinbar or the support and resistance.




In regards to a pattern needing to be valid at a 1:1 ratio, I personally feel it's not the most optimal way to look at the validity of a pattern. A lot of the testing that I do is on stocks/indicies which have a natural upward bias to them.  The outcome of the test, and the validity of any edge perceived can be influenced by this drift, depending on the parameters that you input to get a 1:1 risk reward ratio. Obviously this isn't an issue in the same way for forex, but it does highlight the drama of testing this way. What you essentially have to do is impose a set % move up or down as a cutoff for the test in order for the test to accurately have a 1:1 ratio. This opens up an extra set of variables to any test done that can greatly influence the result.

For example, if you are looking at testing a candle reversal pattern, then to get a 1:1 ratio, you need to code up the test to exit a set% move from the entry day. If you set the % move at a level that is too low, you'll end up with a much lower win % and it would appear that their is no edge involved. If you set it too high, there is the danger that any random drift in the market will make the results look a lot better than they might be. There may or may not be an element of outperformance to the pattern, but when you start imposing extra rules to get a set risk reward scenario, then you are muddying the waters somewhat and it becomes harder to draw any definitive conclusions from it. 

In my opinion, this is going to be the most likely reason for you not finding much in the way of common patterns tested this way, and even if you did, you'd find an enormous amount of conflict in the results due to any differences in arbitrary cutoffs between users, and markets/timeframes involved in tests. Different parts of different markets obviously have different volatility levels which would greatly influence the results, you would need to come up with some kind of volatility based method to try and  find the most appropriate cutoff to test different shares or currencies. Basically you are looking at a minefield of problems to try and do this properly, especially when even within the same market, volatility can expand and contract quite dramatically.

When you simply test a pattern and don't impose any additional criteria to it like I've been doing in this thread, it allows for a slightly more objective view of what's going on - quite a few of the patterns I've tested in the thread so far have shown differing levels of performance over different timeframes, ie some have shown good or bad performance in the shorter timeframes(days), but the opposite when you look a couple of weeks out. Getting this kind of information wouldn't be possible when running a test that imposes exit criteria to get a 1:1 ratio.

Having the extra layer of information here, once you start looking at them regularly enough, will start to show up key elements of how the market behaves over shorter timeframes, which is my main goal for the thread

And in regards to:



> Secondly I feel that if your pattern is only 50% it has no intrinsic value by itself




I'll have to respectfully disagree with that one. Each to their own though

I prefer to look at not just the win%, but the R:R on things as well(all summed up nicely by the profit factor). Personally, I'd be more than happy taking a short term trade that has shown 45% winners and an average win 3 times greater than the average loss, and would be more inclined to pass up the 60% winner with a 1:1 R:R ratio. I'm sure some would disagree with me here, but that's ok! And at the end of the day, the way you manage a trade after the entry can have an impact on the win% and R:R ratio for the pattern anyway. A pattern that may not win more than it loses, but also shows tendency for immediate strength can leave a trader with the option of scaling out of a position during the trade, which when completely change the winning % of trades that are based on the pattern.


----------



## overit (23 July 2010)

> having questions like this help me to qualify why I do what I do, which helps me to spend a little time thinking about things more, which is never a bad thing




Thats what it is about. You come up with a thesis and test it on the market. It will let you know pretty quickly how wrong you are. Most of what I have read on the net has been quickly disproved by my testing. Doesnt matter who thinks your a dill if the market tells you, you are the forex king! LOL!



> What you essentially have to do is impose a set % move up or down as a cutoff for the test in order for the test to accurately have a 1:1 ratio. This opens up an extra set of variables to any test done that can greatly influence the result.




On most of my pattern testing this is why I use a moving average on the ATR. As volatility goes up so does your ATR. Its not perfect but it tries to adapt to changing conditions. But in saying that when I use individual bar size as R/R it hasnt changed the results. 



> quite a few of the patterns I've tested in the thread so far have shown differing levels of performance over different timeframes




Yes and I believe there is good reason. I now trade 1hr+ timeframes even against my wishes. Prefer the action of the shorter stuff  but have come to the realization that the bigger stuff trends better. Also I think because the stops are wider out and less trades you are better protected against noise. The ratio of spread to your profits is also lessened when taking bigger trades. ie 2pips is a lot when you take 10pips profit. Not so much when you take 100pips trade.

Something else I believe is that winrate is inversely effected by risk/reward. ie if you are chasing 1:3 you will drop back to 33% and you chase 1:4 you go back to 25%. (based on random entries). So really the 1:1 probably not a big deal. This gets to the crux of the matter, is it your pattern that is causing price to head in a certain direction. Or is it just being "fooled by randomness". (I recommend reading the book of that title too).


----------



## Wysiwyg (23 July 2010)

overit said:


> *This gets to the crux of the matter*, is it your pattern that is causing price to head in a certain direction. Or is it just being "fooled by randomness".



Very good. 
I have yet to find a pattern that consistently results in a price rise or fall and I aint chasing my tail as much these days with Ami. back testing. Though I don't see the thousand plus back tests I have performed as a waste of time. They have shown me that patterns aren't what makes profitable trading.


----------



## tech/a (23 July 2010)

Hi guys
Interesting discussion.
Ive had sometime to wade through the chat.

Just a couple of my observations with regard to patterns (I use for Index Trading a couple of VSA patterns)



> I have yet to find a pattern that consistently results in a price rise or fall and I aint chasing my tail as much these days with Ami. back testing. Though I don't see the thousand plus back tests I have performed as a waste of time. They have shown me that patterns aren't what makes profitable trading.




I strongly believe its the way you apply a pattern trade/s to your trading more than the pattern itself that will determine greatest success.

I only take pattern signals when I know the direction of the trend in which the pattern occurs.
If I get a reversal pattern signal long or short I find waiting for confirmation of a continuence in the alteration of trend is a must.
How do I determine trend.
Simply a line if its broken and there was a signal before it then I look for an entry at the break so I can set a trade on a Stop limit order.
I can stop and reverse with this method.
So I dont take signals against the trend without a break in trendline.
Works well.

The next is timeframe---how long is a pattern valid---my answer to that is until another pattern succeeds or Fails.
Here is a current FTSE Index chart marked up for the last few days and yes I'm still in the latest trade shown.




The next consideration is liquidity.
I have found that The FTSE which trades around 20X more contracts than the SPI is far more reliable and has far more available trades than the SPI.
Infact I cant see myself trading the SPI unless I see something that looks like Everest there to trade!
A 20 min high volume bar in the SPI is around 500 contracts
in the FTSE or DAX its 6000

Enough to ponder hope it is of some help.


----------



## tech/a (23 July 2010)

The above chart is the DAX
Brain fadded when labelling I have both open--trying to do too much at once.


----------



## overit (24 July 2010)

tech/a said:


> I strongly believe its the way you apply a pattern trade/s to your trading more than the pattern itself that will determine greatest success.




Totally agree.

I have a pattern that will make you laugh at its simplicity. Does it read the markets mind or punch above it weight?... I really doubt it although it is the best pattern I have tested. What makes it so great in my eyes is that it is frequently occurring and happens regularly at short term tops and bottoms. It gives me an entry point and set risk. The hard part is working out when to exit.




Both of these patterns are identical in my eyes.

I dont know if this pattern has a name. My theory behind the pattern is once you have 3 higher lows you put a sell order under the third low (as per pic) and keep following the lows upwards until you have a break down. And inversely for lower highs you put a buy order on the third lower high. I particularly like this pattern when forming double dip bottoms or tops and on the "wrong" side of the moving average (against the trend *ducks for cover!*) and also on short term S/R.


----------



## overit (25 July 2010)

Here is a few basic examples of the above pattern in action from the current euro 1hr action. The pattern is nothing special but notice it forms regularly on reversals getting you into the trade. Also something I havent mentioned is the times that these patterns are more likely to be reversals. Around london open, us open and london close are great times and to a lesser extent asian open. Makes sense when you think about it. Daily high and lows can be great for your support and resistance zones if in doubt. Obviously the bigger S/R zones the better chance of a solid bounce but sometimes you just dont know. After all that said and done the pattern is just and entry. You need to find your exit mojo as that is where your money is made or lost. If you go for the big outliers prepare for more losses and bigger drawdowns. This is where the peter crowns and threalthing links from earlier come into play.




Here is something I did to check out the main reversal times using this pattern. (Times in MT4 time). The bulk of the action is in the london session.


----------



## overit (25 July 2010)

This chart is a good example of what I mean by exit. Most of these trades went to 1:1 but there was one massive outlier and another decent size one. If you waited for the big trade you would have carried a fair bit of a drawdown (if discarding the use of a break even stop.) If we took 1:1 we would have been going fine but would have missed the eventual smoking hot run loading our bank and buying that gold ferrari! LOL!


----------



## Wysiwyg (25 July 2010)

overit said:


> This chart is a good example of what I mean by exit. Most of these trades went to 1:1 but there was one massive outlier and another decent size one.



Matey those black background .jpg images make it hard to see the chart drawings. 

Also your RRR of 1:1 is particular to you. This ratio will be different for most of us as we have different risk.


----------



## overit (25 July 2010)

That last chart was more of an example for the exit principle of cutting it short or letting it run rather than my entry points. If you want a clearer view it is the last 2 weeks from the euro.

*Here is an interesting post from hanover at the forex factory*. It is great food for thought. It also makes you question your trading strategy and where you edge lays. Some good points. 

With this pattern I have presented I feel that the "edge" is not the pattern but trading the rebound off support and resistance and the "outlier" runs that it produces. The pattern is just something to outline my trade setup. Commonly when S/R breaks it just blows straight thru and not producing a pattern as such.

The pattern could be easily described as a break in lower highs (downtrend) when coming to support or a break in higher lows (uptrend) when coming to resistance. 

With this theory you could use pinbars, engulfing candle inside bars or a myriad of other cool indicators which would all be telling you the exact same thing. 

I really like inside bars also. I trade the setup on a 4hr chart. It tells you a similiar thing. 4hours of ranging and a break of the high or low. But you cant get too carried away. I have MT4 charts and IG charts. They differ by 1hour in their time zones. Guess what you get different bars for same action. What I learnt from this was that the IB usually occurs in the asian hours and the break out is the european opening. Kinda fits in with what I said before about major reversal times. Again its just an entry signal and defined risk. Only half the work is done.


----------



## Wysiwyg (25 July 2010)

overit said:


> Totally agree.
> 
> I have a pattern that will make you laugh at its simplicity. Does it read the markets mind or punch above it weight?... *I really doubt it although it is the* *best pattern I have tested.* What makes it so great in my eyes is that it is frequently occurring and happens regularly at short term tops and bottoms. It gives me an entry point and set risk. The hard part is working out when to exit.




Overit, I would like to see the results of a couple of these patterns in the now if possible. If they are frequently occurring then do you have any to observe the outcome over the coming week?


----------



## overit (25 July 2010)

Wysiwyg said:


> Overit, I would like to see the results of a couple of these patterns in the now if possible. If they are frequently occurring then do you have any to observe the outcome over the coming week?




Draw a line off fridays high and low and we will be perched waiting for the week to start. I dont like to carry trades through the weekend. 

Now the reason I think this is my best pattern is not because it punches above its weight. Its because of the frequency of where it happens. (S/R, head fakes, double bottoms/tops, etc).  Thru my testing period of 2009 the raw pattern (no filter) punched around 53% for 1:1. Stop was ATR of entry bar or ATR(50) whichever was smaller. Good but the first pattern I posted was the same with a much larger statistical base and it bummed out. I stopped testing this pattern when I realised a greater calling for it. (I have to do this manually so I only test what looks the best). 

This is an enlarged chart from the last 2 days on the eur/usd 1hour. As you can see the raw pattern happens a lot. They are very easy to pick yourself. Notice what I said about the times also. Asian session and when the US is closed is ****ty. Money, news moves the market.

(click on image to enlarge)



If looking to use this for your own entries I would recommend to take it around levels you think it will rebound off. Support/Resistance, overbought/oversold, trendlines etc. Personally I only use horizontal S/R that are only a few days old and havent been broken. I have a few other little nuances but thats your prerogative. This is how I tested it and the results were great. It works now I trade it live but not to say it wont stop working sometime in the future. The nature of the market! I am always looking for new ways to trade the market.

To complete this trade is your call. I use a 50sma type setup. Peter Crowns in his DIBS thread has an interesting method of using 1hour entries (he uses inside bars) to build structures that ride the daily trend. What your hoping is that when the price goes back to test the support or resistance it rejects it, you nab the entry and it continues the trend or starts a new one.


----------



## Wysiwyg (25 July 2010)

overit said:


> Draw a line off fridays high and low and we will be perched waiting for the week to start. I dont like to carry trades through the weekend.




So it is a short sell at 1.2908? There is old resistance at 1.2912.


----------



## overit (25 July 2010)

Wysiwyg said:


> So it is a short sell at 1.2908? There is old resistance at 1.2912.




I think this one would be a personal judgment. Yes it is the raw pattern. I also think new higher resistant point weakens the older ones, it happened out of hours and I wouldn't trade it coming into a weekend. Could gap either way. I would just wait for a pattern to form in our blue areas in the new week. I have a theory on the weekend gap and Asia's ability to push new ground but it needs further testing.

The last trade was the green circle. It traveled 130pips before turning around. It was a trade because it occurred level with the previous day high (resistance). You could also make a case for the bottom support zone on that last flick up but I wouldn't have as it was a bit far away from my zone. Personal preference. 

My last actual trade I placed was the setup on the left of screen. Triple top at the highs and I landed a good trade down and had the rest of the week off.


----------



## zipzap (28 July 2010)

Awesome posts professor!! I trade futures in much the same way!


----------



## professor_frink (28 July 2010)

zipzap said:


> Awesome posts professor!! I trade futures in much the same way!




Thanks zipzap, appreciate it!

A big welcome to the forum too. Hope you enjoy your stay


----------



## professor_frink (29 July 2010)

afternoon folks

Haven't had too much to add this week, seems to be a case of steady she goes!

Just having a quick look at what happened last night. First thing that stands out is the daily range has been quite low of late(to be expected coming out of a corrective period though).

To have a look at things a little closer, I've tested out how the market has generally behaved in the past based on similar circumstances.

Test below is looking for price coming off a 20 day high(which we made yesterday), today's range is in the bottom 10% of readings for the past 3 weeks:




Not really much to get excited about either way, but isn't really suggesting much weakness coming through yest, even after the recent rally.

Just to get a slightly more specific picture, I filtered the results based on today being a lower close than yesterday and on lower volume than the day before(which is what we've seen happen overnight):




This does weaken the results a little, but the results don't really suggest anything that would be of a concern to anyone holding longs right now

Having a look at other instances of this type of behaviour on the SPY, it's a bit of a mixed bag - happens fairly randomly and at various stages of trend, probably not too much that can be read into it either way. Looks like waiting for the market to develop a little from here is the way to go.

Cheers


----------



## Wysiwyg (29 July 2010)

professor_frink said:


> afternoon folks
> 
> To have a look at things a little closer, *I've tested out how the market has* *generally behaved in the past based on similar circumstances.*
> 
> Test below is looking for price coming off a 20 day high(which we made yesterday), today's range is in the bottom 10% of readings *for the past 3 weeks:*



Hi Prof, Knowing this is testing short term patterns I would like to suggest that your sample period doesn't reflect the statistics as much as a maximum sample period would. There are many nuances in price movement and they are terribly hard to quantify or exact. Especially over short periods.  What do you think about that?


----------



## professor_frink (29 July 2010)

Wysiwyg said:


> Hi Prof, Knowing this is testing short term patterns I would like to suggest that your sample period doesn't reflect the statistics as much as a maximum sample period would. There are many nuances in price movement and they are terribly hard to quantify or exact. Especially over short periods.  What do you think about that?




I think I'm not quite sure what you are getting at Wys! Could you clarify it for me a little more?


----------



## Wysiwyg (29 July 2010)

overit said:


> Here is a few basic examples of the above pattern in action from the current euro 1hr action. The pattern is nothing special but notice it forms regularly on reversals getting you into the trade. Also something I havent mentioned is the times that these patterns are more likely to be reversals.




Unfortunately this week on this particular occasion the pattern did not manifest and the longer term up trend continued.

I know where you are coming from though.


----------



## Wysiwyg (29 July 2010)

professor_frink said:


> I think I'm not quite sure what you are getting at Wys! Could you clarify it for me a little more?




How far back is your back testing sample period Professor?


----------



## professor_frink (29 July 2010)

Wysiwyg said:


> How far back is your back testing sample period Professor?




17 years for today's test


----------



## Wysiwyg (29 July 2010)

professor_frink said:


> Test below is looking for price coming off a 20 day high(which we made yesterday)



Any particular reason why 20 days?


----------



## professor_frink (29 July 2010)

Wysiwyg said:


> Any particular reason why 20 days?




because I like round numbers. When I'm looking at market positioning, I'll generally use 5 days for the immediate trend, 10 days for a slightly longer trend and 20 for a slightly longer view still. I could have used 17 or 21 days, but the story is still the same: I was looking for periods where the market had moved up and the range had also dried up as we started printing new highs.


----------



## Wysiwyg (29 July 2010)

professor_frink said:


> Test below is looking for price coming off a 20 day high(which we made yesterday), *today's range is in the bottom 10% of readings for the past 3 weeks:*




You must be using exit criteria which determines % profit. Does this not skew results to exit criteria rather than frequency of event?


----------



## professor_frink (29 July 2010)

Wysiwyg said:


> You must be using exit criteria which determines % profit. Does this not skew results to exit criteria?




Wys, have you read the thread from the start, or are you just picking up bits and pieces and making assumptions?


----------



## Wysiwyg (29 July 2010)

> Buy at the close of price on the 9th day, and *sell when price closes back above the 5 day MA. *




No but is the bold type the exit criteria for all back tests?


----------



## professor_frink (30 July 2010)

Wysiwyg said:


> No but is the bold type the exit criteria for all back tests?




It was all outlined in the very first post I made:



professor_frink said:


> General idea is this: find a pattern/point of interest in price,volume,range, breadth,etc and then test it out as a buy signal. Instead of looking at a pattern and using a predefined exit to go along with it, *the performance of the market following the pattern is logged to get an idea of what can be expected.*
> 
> So, onto a basic test. If we have a look at Friday's bar for the S&P500, we can see that it was an inside day(see chart here). So our first test will be to see if an inside day has typically lead to any strength or weakness in the past. *So we will code up an inside day and run it as the buy signal by itself, and see how the market has performed 'x' amount of days out from one.:*




In the attachments on my posts, they are basically just a list. The very left hand column is the number of days after a signal(or 'x'). The rest should be pretty well self explanatory.

The test you are referring to is the one exception to that and the only test I've posted in here with a predefined exit attached to it.

Hope this helps


----------



## Wysiwyg (30 July 2010)

professor_frink said:


> Hopefully my ramblings here have made sense
> 
> All thoughts, comments and criticism welcome




Yep, got the gist now. Thanks for clearing up my misunderstanding.


----------



## professor_frink (30 July 2010)

Wysiwyg said:


> Yep, got the gist now. Thanks for clearing up my misunderstanding.




No worries Wys, happy to help


----------



## professor_frink (30 July 2010)

Have been having a look at the outside bar that was printed in the US overnight, and thought I'd go through the individual tests I ran to come to the conclusion that I have.

The main goal for me in running this thread was to highlight the process involved in the way I look at the market, with the hope that it'll get people paying closer attention to the individual moves the market makes. Previously in the thread I had highlighted how the positioning of a pattern relative to what the market had been doing leading up to it can impact on what you would expect from that pattern going forward. The other big thing I find that can impact on patterns is volume. Hopefully the following will help to highlight that a little.

First thing about the outside bar that was made overnight was that it closed lower than the open. So the first test will look at outside bars that close lower than they open with no other filters at all:




On it's own, it suggests fairly flat trading for a couple of sessions, but reverts to being more neutral and in line with general drift upwards afterwards(there's a slight outperformance 15-20 days out, but isn't really worth getting excited about)

Now I'll run the test, but look for instances where 2 days ago was a short term high.




Tells a pretty similar story. Results are slightly less bullish than the prior test, but aren't entirely unexpected - the 2nd post in this thread highlights the difference in short term performance after price is at a new short term high versus a low FWIW.

Now for volume. Today's volume was higher than yesterday's. I'll run the same test as before, but look for the instances where we had higher volume than the prior day:




All of a sudden it gets interesting.When the results are filtered based on volume, the short term weakness becomes a little more pronounced(though isn't really anything to be concerned about if you are long), but the possible upside looks quite a bit better.

And now lets have a look at the same pattern, but filter for the times that it occurs on lower volume:




This pretty well flips the results on their head! Instead of the potential for a mild pullback and longer term strength, we see the possibility of a short term bounce and longer term weakness. This is why I generally try and look at volume as well as the general position of the market for a test, results can often become a lot more pronounced, and sometimes even show the exact opposite depending on the volume characteristics that go with the pattern.

Cheers


----------



## white_crane (12 September 2010)

Just reading through an older thread that I'd missed and wanted to point out that there is some *very* useful knowledge to be gained here.  Thanks must go to the wise old hands who posted here.


----------



## professor_frink (1 October 2010)

Here's something that may be of interest(see chart below)




So we had an outside day printed overnight on fairly decent volume with the market selling off during the day.

The following test looks to buy an outside day, with the high to be the highest for the past 50 sessions on volume that was the highest over the past 10 days and  the close lower than the open.




Hasn't happened very often before, but does highlight some possible weakness in the short term

Cheers


----------



## professor_frink (15 March 2011)

thought I might throw something slightly different to a price and volume pattern into this thread.

Tomorrow is a fed day, and today's low was the lowest for the past 20 days. Buy on close:




Seems to be a half decent bullish edge for the next few days


----------

