Thinking Stuff's ATM

Automated Trading Machine (ATM) makes it simple to remove fear and greed from your trading. Automated trading is no longer just for the rich or nerdy. Our revolutionary software runs on your computer, using your trading rules, but none of your emotions. There's just one requirement - you know how to use a mouse.  Learn more...

Thinking Stuff's ATE

Automated Trading Execution (ATE) is where we run your trading systems for you on our servers. Your system can be exported from ATM, or written in plain English and we'll make it for you. We'll even backtest and suggest improvements if you want us to. This service essentially automates your automated trading.  Learn more...

Thinking Stuff's Groups

Join a group of like-minded individuals, and help each other to trading success. Once you join a group, you will have access to that group's trading systems, ideas, and feedback. And please contribute your own knowledge as much as possible. Or contact us to start your own group.  Learn more...

Help with Coding/Formulas and sets of rules for Patterms

1 reply [Last post]
frankd9963
frankd9963's picture
User offline. Last seen 1 year 39 weeks ago. Offline
Joined: 05/10/2010
Groups: None

This disussion is for help creating coding/formulas for the program but we all need to come up with a set of rules for Double bottoms, tops, head and shoulders bottom and top , flags, pennants, cup and handles, accending triangles and more. Together we can create a set of rules for each pattern that can be converted into coding for the software.

fd

sharky
sharky's picture
User offline. Last seen 6 days 11 hours ago. Offline
Joined: 03/06/2009
First let me say

First let me say congratulations on the summary of the task at hand. Brilliantly and succinctly worded.

But now let me explain the problem in the only way that I know how - with too much information :-)

Indicators are mathematical equations. The high/low/open/close/volume are all just numbers that feed into these equations. A simple moving average (SMA) over the last 20 bars is just the sum of those 20 values, divided by 20. The relative strength index (RSI) is a little bit more complicated, but it's the same theory.

Then we come to patterns. Patterns are normally easier for the human brain to interpret than a computer. We're really good at finding order amongst chaos. Captcha is a good example.

Candlestick patterns are already offered in ATM, but are calculated a little differently to the patterns mentioned in the original post. Candlestick patterns consist of sometimes just 1 bar, sometimes 2, 3, maybe 4. All of the bars that make up a candlestick pattern are next to each other. And candlesticks already have defined rules that can be resolved by a computer.

The patterns we're talking about here are harder for a computer to decipher. Take the head and shoulders pattern - it could consist of between 20 and 200 bars (or more). A lot of those bars are just noise. The line defining the shoulders could be horizontal or at an angle. The distance between the head and shoulders could be of varying size.

Double-top means that the price reached some level (X), fell away, went back to somewhere close to the original level (Y), and fell away again. X and Y don't have to be exactly the same. How much variation is ok? How far does the price have to fall away? How many bars have to be between the two peaks? How many bars are allowed to be between the two peaks?

A human can look at the chart and spot these patterns instantly. But to get a computer to do it, all this tiny detail has to be worked out. We can't tell a computer to "find a double-top", but we can give it a series of rules which we decide equals a double-top.

For example, an uptrend is a pattern too. We can look at a chart and normally determine if the chart is in an uptrend or not. But we can't tell the computer to find us an uptrend. We can however, decide that the close of the bar being above the SMA(20) equals an uptrend, and the computer can calculate that for us easily.

This thread is to generate some discussion as to what the series of rules should be for each of the patterns listed in the original post (and more if there are more). I suggest writing the pattern name in bold to make it easy to keep track of who's talking about what. Links to other websites with helpful info would also be appreciated.
 

n/a