Pattern Trading

Yangs

Junior member
Messages
20
Likes
0
I've wrote an excel program to generate upto a thousand random patterns at a time ie: 866L L3 <= O0 AND O1 < H2 AND L2 <= 01 AND H2 >= H4 AND L4 <= L2 AND L0 > O4. These patterns auto run through a list of stocks, indices etc. The best pattern results are saved and a report like the attached file is created.

Anyone interested in using bar patterns to find trade signals?
 

Attachments

  • T2W_FTSE100.xls
    55 KB · Views: 678
Yangs said:
I've wrote an excel program to generate upto a thousand random patterns at a time ie: 866L L3 <= O0 AND O1 < H2 AND L2 <= 01 AND H2 >= H4 AND L4 <= L2 AND L0 > O4. These patterns auto run through a list of stocks, indices etc. The best pattern results are saved and a report like the attached file is created.

Anyone interested in using bar patterns to find trade signals?

Sorry m8, nobody wants to know you found the holy grail lol goodbye
 
Yangs I will listen to what you have to say. If you have gone to the trouble of programing excel the least I can do is listen with an open mind

As with everything in life the best ideas need not come from the top

PM if you prefer
 
SOCRATES said:
There is a very fine line dividing sense from nonsense.
The great majority are unaware of its existence, or, choose to ignore it. Consequently they succeed in misdirecting themselves to choose the wrong side of this line, for reasons best known to themselves. This is a source of amazement to those very few able to correctly logically deduce and reason, viewing nearly everything you will encounter here as nonsense, pure nonsense, that the majority ultimately embrace..
Jeez Soc are you still pushing that old drivel, I know you want to come off as sage but you just sound like a broken record
 
cheers dc
I saw an article in Traders mag on price patterns and visited www.TradingPatterns.com The pattern search program on there costs $1200. I bought Michael Harris's book "Short term trading with Price Patterns". I liked the idea but not the price of the program lol, so I thought I'lld write my own little (big) program. Took me a day to write and four weeks to fine tune. I've added loads of stuff to it including an automatic stock list quote download and update, also got it to work with FX data. I'm now watching the best pattern results to see how good it really is. I'lld like ideas on how to take this program further, if you've any particular market you want me to try, let me know and i'll try it. Next few weeks should be interesting.
 
Trades for Monday Open DJI30

Trades to watch for DJI30 stocks Monday 03/10/05
 

Attachments

  • T2W_DJI30.xls
    21.5 KB · Views: 513
Can pattern trading be programmed? For ex, not every double bottom is the same, or one pattern can be bullish according to text book TA but actually be bearish and should be a sell signal. But isn't simply recognizing a specific pattern a challenge for a computer- without even trying to intrepret its meaning ?
I am a discretionary trader but I am interested in systematic trading , however I wonder how all the ingredients of my trading could be integrated into a system, from the use of trendlines, fib retracements and multi time frames to sentiment indicators for ex. to name only a few.
 
monktrader said:
Can pattern trading be programmed? For ex, not every double bottom is the same, or one pattern can be bullish according to text book TA but actually be bearish and should be a sell signal. But isn't simply recognizing a specific pattern a challenge for a computer- without even trying to intrepret its meaning ?
I am a discretionary trader but I am interested in systematic trading , however I wonder how all the ingredients of my trading could be integrated into a system, from the use of trendlines, fib retracements and multi time frames to sentiment indicators for ex. to name only a few.

Hi MonkTrader,
I've not tried intraday on the Pattern trading program (will be trying it soon). EOD pattern signals are looking good. I'm in the early days of testing my program and am well pleased with it. Recognizing a pattern for a computer is not difficult, its interpreting the results thats the challenge. My program works on the Open, High, Low, CLose historical data. If a recurring pattern has a high number of wins to losing trades and has low consecutive losers to winners, the pattern is then more reliable. Over time, each pattern can be monitored and assessed to judge if its a prime candidate for a trade. What I am trying to find is good reliable patterns that reoccur (probably not spelled correct :)) on a regular basis and that win much more than they lose. Will post some trades for Monday over the weekend, to see how they do. I am always looking for extra things that could be programmed in to help, any suggestions or specifics and i'll see what i can do.

cheers for replying
John
 
Pattern Trades for FTSE100 Mon 10 Oct 05

Yangs said:
Hi MonkTrader,
I've not tried intraday on the Pattern trading program (will be trying it soon). EOD pattern signals are looking good. I'm in the early days of testing my program and am well pleased with it. Recognizing a pattern for a computer is not difficult, its interpreting the results thats the challenge. My program works on the Open, High, Low, CLose historical data. If a recurring pattern has a high number of wins to losing trades and has low consecutive losers to winners, the pattern is then more reliable. Over time, each pattern can be monitored and assessed to judge if its a prime candidate for a trade. What I am trying to find is good reliable patterns that reoccur (probably not spelled correct :)) on a regular basis and that win much more than they lose. Will post some trades for Monday over the weekend, to see how they do. I am always looking for extra things that could be programmed in to help, any suggestions or specifics and i'll see what i can do.

cheers for replying
John
:)
 

Attachments

  • T2W_FTSE100_081005.xls
    25.5 KB · Views: 504
Yangs said:
cheers dc
I saw an article in Traders mag on price patterns and visited www.TradingPatterns.com The pattern search program on there costs $1200. I bought Michael Harris's book "Short term trading with Price Patterns". I liked the idea but not the price of the program lol, so I thought I'lld write my own little (big) program. Took me a day to write and four weeks to fine tune. I've added loads of stuff to it including an automatic stock list quote download and update, also got it to work with FX data. I'm now watching the best pattern results to see how good it really is. I'lld like ideas on how to take this program further, if you've any particular market you want me to try, let me know and i'll try it. Next few weeks should be interesting.

Did you say you wrote the program in one day? You should qualify for a Nobel prize in software programming, sorry not yet available. :)

Seriously, check the pattern you posted previously, it does not make any sense to me. Joe
 
Yangs said:
The spreadsheet shows the patterns that have signalled a buy or sell signal for this Monday.
Column A shows the pattern number. Column B shows the trade direction Buy or Sell and the stock. Column C shows the number of times this pattern has produced a signal within the last, in this case 409 rows (approx 18 months).. Column D shows the last date a signal was triggered. NEXT means Buy / Sell the next market open price, If the pattern number in column A ends in L it means go Long and S means Short. The Limit Column E is the profit target and the Stop is Column F. Columns G and H show the total won and lost of the pattern. Columns I and J shows the number of times the pattern has won or lost and columns K and L show the consecutive number of wins and losses of the pattern. Row 4 shows the parameters used ie: Limit is 1.25% of open price and the stop is 1.15%., also that consecutive losing trades are less than 4 and the number of trades more than 10 for the time period. The Differnce in Column M is the total wins - total lose. The rank in Column N is a % result parameter for the pattern. Above 0.50% is interesting :)
 
Fader said:
Jeez Soc are you still pushing that old drivel, I know you want to come off as sage but you just sound like a broken record
It is not drivel, it constitutes a conglomerate of carefully interwoven and linking axioms. An axiom is a fundamental truth, whether you like it or not. In point if fact I have retained it purposely, as it includes you, and although it is there for the general benefit of the membership and visitors but is retained particularly for your specific benefit, Fader, don't forget. If at first you do not succeed in understanding all of it, it will do you no harm to read it yet once again until you do, and the penny....drops...
 
Yangs
Looks interesting.
Could you just give a forecast for the Dow Jones index (that's the only one I do ) for say tomorrow and on for a few days ??
 
Yangs said:
cheers dc
I saw an article in Traders mag on price patterns and visited www.TradingPatterns.com The pattern search program on there costs $1200. I bought Michael Harris's book "Short term trading with Price Patterns". I liked the idea but not the price of the program lol, so I thought I'lld write my own little (big) program. Took me a day to write and four weeks to fine tune. I've added loads of stuff to it including an automatic stock list quote download and update, also got it to work with FX data. I'm now watching the best pattern results to see how good it really is. I'lld like ideas on how to take this program further, if you've any particular market you want me to try, let me know and i'll try it. Next few weeks should be interesting.

To make it realistic for EOD trading I think one ought to use the same days open figure and not the previous close figure. It always changes between one close and the next open and that is when one will probably do the trade. So from open to close figure on same day ( I hope that's not a problem )
Sorry to be a bit negative to your lovely new system but one must also put in a slippage figure, especially if one is going to use spread betting. The Dow future usually gives a good indication of the probable opening figure. However if you have a look at the quote on the spreads it can be a quite a bit bigger or smaller !
Anyway best of luck.
 
Pat494 said:
To make it realistic for EOD trading I think one ought to use the same days open figure and not the previous close figure. It always changes between one close and the next open and that is when one will probably do the trade. So from open to close figure on same day ( I hope that's not a problem )
Sorry to be a bit negative to your lovely new system but one must also put in a slippage figure, especially if one is going to use spread betting. The Dow future usually gives a good indication of the probable opening figure. However if you have a look at the quote on the spreads it can be a quite a bit bigger or smaller !
Anyway best of luck.

Pat,
The Patterns shown use the Next days market Open price after a pattern signal has formed. I have an option in the program to allow the Closing price of the previous day to be used. The files that i've posted use the Buy Next Open market price.

To take slippage and commisions into account, multiply the total number of trades by the slippage,spread, commision values and subtract this from the value in the pattern Difference column. Will implement this in the program.

I will also add to the report a trade view to show the last 10 signals. So if a pattern has had a maximum 10 consecutive wins in the past, and the trade view shows that the last 10 signals have been winning trades, then it is likely that the next trade will not be a winning trade. This will save having to load an individual pattern each time to see if tthe last few trades have been winners or losers.

Have attached a Report for the DJI. It also shows the complete run of a pattern and when each trade occurred. There is also a chart tab.

Remember, I am only testing my program at the moment. When I'm completely satisfied with its results I will trade the signals. Til then I am paper trading:)

Cheers
John

PS: Yahoo 5 day chart view can be used to see which was hit first, the Limit or the Stop.
 

Attachments

  • DJI_10102005.xls
    188.5 KB · Views: 441
Last edited:
Hi Yangs,
I'm something of a Luddite when it comes to spreadsheets and computers, so I'm struggling to get a grip on what it is that you're doing. If I've understood you correctly - and please put me right if I haven't - you've written a program which has generated 1,000 different 'patterns'. Most traders on these boards have a very specific understanding of patterns to mean visual chart patterns. If your computer generates patterns at random, I assume that it is not looking for conventional T.A. chart patterns like 'Head & Shoulders' and 'Cup & Handle' etc.? If this is the case, then the problem that you face - as I see it - is that a thousand patterns is far too small a number to produce anything that is of real value. Presumably, the total number of possible patterns is infinite? If your data suggests otherwise, please can you provide charts to show visual representation of the patterns that your program produces? If it generates something new that isn't already widely known about by traders, then you will be showered with praise and money, for your program will be worth a very great deal indeed! I'm sorry if I sound sceptical, but I confess that I'm struggling a bit with this one! That said, I am mindful of the saying: 'the mind is like a parachute - it works best when it's open'. Anyway, I wish you the best of luck with your research and I look forward to you proving me wrong!
Tim.
 
Yangs said:
Pat,
The Patterns shown use the Next days market Open price after a pattern signal has formed. I have an option in the program to allow the Closing price of the previous day to be used. The files that i've posted use the Buy Next Open market price.

To take slippage and commisions into account, multiply the total number of trades by the slippage,spread, commision values and subtract this from the value in the pattern Difference column. Will implement this in the program.

I will also add to the report a trade view to show the last 10 signals. So if a pattern has had a maximum 10 consecutive wins in the past, and the trade view shows that the last 10 signals have been winning trades, then it is likely that the next trade will not be a winning trade. This will save having to load an individual pattern each time to see if tthe last few trades have been winners or losers.

Have attached a Report for the DJI. It also shows the complete run of a pattern and when each trade occurred. There is also a chart tab.

Remember, I am only testing my program at the moment. When I'm completely satisfied with its results I will trade the signals. Til then I am paper trading:)

Cheers
John

PS: Yahoo 5 day chart view can be used to see which was hit first, the Limit or the Stop.

Thanks for posting your figures on an excel chart.
I wish I was a mathematician but as I understand it all your deals are longs ?
Not that it matters of course.
And your winning ratio is 57.9% - higher the better.
I don't think you should let it make a difference that your previous say 10 deals were all winners and therefore you would be less likely to win the 11 th deal - probably the reverse.
Would it be easier to programme for just one day at a time ? i.e. Dow daily cash. The SB company would close the position at the end of the day automatically ( no spread) and then you re-enter the market the next day if advised to do so.
hope this of some interest
 
Pat494 said:
Thanks for posting your figures on an excel chart.
I wish I was a mathematician but as I understand it all your deals are longs ?
Not that it matters of course.
And your winning ratio is 57.9% - higher the better.
I don't think you should let it make a difference that your previous say 10 deals were all winners and therefore you would be less likely to win the 11 th deal - probably the reverse.
Would it be easier to programme for just one day at a time ? i.e. Dow daily cash. The SB company would close the position at the end of the day automatically ( no spread) and then you re-enter the market the next day if advised to do so.
hope this of some interest

Pat,
Fiirst, lets see how the patterns make out over multiple days. One day trading would be good though:)
 
timsk said:
Hi Yangs,
I'm something of a Luddite when it comes to spreadsheets and computers, so I'm struggling to get a grip on what it is that you're doing. If I've understood you correctly - and please put me right if I haven't - you've written a program which has generated 1,000 different 'patterns'. Most traders on these boards have a very specific understanding of patterns to mean visual chart patterns. If your computer generates patterns at random, I assume that it is not looking for conventional T.A. chart patterns like 'Head & Shoulders' and 'Cup & Handle' etc.? If this is the case, then the problem that you face - as I see it - is that a thousand patterns is far too small a number to produce anything that is of real value. Presumably, the total number of possible patterns is infinite? If your data suggests otherwise, please can you provide charts to show visual representation of the patterns that your program produces? If it generates something new that isn't already widely known about by traders, then you will be showered with praise and money, for your program will be worth a very great deal indeed! I'm sorry if I sound sceptical, but I confess that I'm struggling a bit with this one! That said, I am mindful of the saying: 'the mind is like a parachute - it works best when it's open'. Anyway, I wish you the best of luck with your research and I look forward to you proving me wrong!
Tim.

Hi Tim,
The program can generate upto a thousand random patterns each time it is run, not just a thousand patterns. The best patterns from each run can be pulled and saved. What I have not mentioned is that the patterns can be more complex than the ones i have shown. These are basic open, high, low, close patterns. I have also included averages, pivots, bar range and fractals.
The patterns are based on upto 5 bars of OHLC data. Comparing one bar to the next and the next and so on as the pattern describes.It then looks for recurring patterns within the historical data and reports the number of occurrencies of each pattern. A variable percentage or point value for limit and stop can be input before each search. This limit and stop is compared to the high and lows and the results win or lose processed..

I do not wish to prove you wrong. I do what I do, and I do it the way I do it., no problem :)

cheers
John
 
Top