Forex Factory
  • Login

  • Username: Password:
  • 11:13am

  • Search
  • Home

  • Forums

  • Trades

  • Calendar

  • News

  • Market

  • Brokers

Options

Search
Search
Search

Subscribe to Thread

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Account Matching or Prop Trading 3 replies

Pattern Matching Concept EA 61 replies

Two matching highs trend breakout? 3 replies

Matching metatrader times to alerts 0 replies

Oanda's NOT a matching engine...? 4 replies

  • Platform Tech
  • /
  • Reply to Thread
  • 20

pattern matching

  • Last Post
  • First Unread
  •  
  • 1 2Page 34 5
  •  
  • Post# 41
  • Quote
  • Feb 2, 2010 8:31pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting sloof
I have a Q... is it possible to see if something contains fractals? Like can any programs do this? (sorry if it seems off topic)
Not sure if such a thing exists. Since I only have average math knowlege much of the more complicated fractal geometry stuff is beyond me.
  • Post# 42
  • Quote
  • Feb 2, 2010 8:41pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
I have made a little interactive pattern design tool:

Attached Image (click to enlarge)
Click to Enlarge

Name: xp [Laufend] - Sun VirtualBox-2010-02-03-02:23:18.png
Size: 59 KB


I made it in Python because the dynamic compiling and evaluation at runtime is much easier with a dynamic script language.

The pattern shape to the left will update while you are typing to the right.

copy&paste your findings into a text editor since it has no load and save functions. After you are finished with the function just port it from python to pascal to use it in the dll. Since this must not be done every day and the translation from python to pascal is ralatively easy i have decided that this solution is good enough.

I also have a new version of the dll which i will also upload soon.
Attached File
File Type: zip patterndesigner.py.zip   1 KB | 212 downloads
  • Post# 43
  • Quote
  • Feb 2, 2010 8:50pm
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
Quoting 7bit
I have made a little interactive pattern design tool:

Attachment 407513

I made it in Python because the dynamic compiling and evaluation at runtime is much easier with a dynamic script language.

The pattern shape to the left will update while you are typing to the right.

copy&paste your findings into a text editor since it has no load and save functions. After you are finished with the function just port it from python to pascal to use it in the dll. Since this must not be done every day and the translation from python to pascal...
This gives me an idea! I could create an app(even a web app) where you don't need to edit anything! You just have to click(to create points) and drag points to make a pattern. I believe such a toolkit for javascript which can help do this already exists on the internet (if anyone knows please reply).

Once you complete your pattern you can have the function displayed.

Edit: I just thought of something else! You can also set a chart as the background image and trace it however you wish! If and when I get the chance I'll see if I can get this done unless someone else does it first =P
  • Post# 44
  • Quote
  • Feb 2, 2010 8:56pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting sloof
I could create an app(even a web app) where you don't need to edit anything! You just have to click [...]
This would be very nice since I'm very lazy
  • Post# 45
  • Quote
  • Feb 2, 2010 9:11pm | Edited at 9:25pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting sloof
unless someone else does it first =P
There seems to be not much interest in this topic from the other programmers, what i cannot really understand. This is the first EA ever that i have seen in the forums or written myself that instantly made profit on the M1 chart during the very first test runs with arbitrary parameters for stop and target and a pattern function that i just made up out of nothing but thin air.

Today i had it running on the eurusd M1 with something that does not even deserve the name "pattern" and it won 14 * $50 and lost 2 * $150. This is a profit factor of 2.3 (!) and a net profit of $400

Edit: and while i was writing this it just made the 15th win and now opened long to 1.39577. LOL
  • Post# 46
  • Quote
  • Feb 2, 2010 9:37pm
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
Quoting 7bit
There seems to be not much interest in this topic from the other programmers, what i cannot really understand.
Dude don't worry about others... there's a reason why only 5% of traders succeed

Quote
This is the first EA ever that i have seen in the forums or written myself that instantly made profit on the M1 chart during the very first test runs with arbitrary parameters for stop and target and a pattern function that i just made up out of nothing but thin air
welcome to the 5%
  • Post# 47
  • Quote
  • Feb 2, 2010 9:51pm
  • wmd
    Commercial Member | 351 Posts | Joined Apr 2009
Interesting work 7bit. I'm not anywhere near a competent programmer so can't really give much input appart from saying I like what your trying to do with this. Trading complex patterns is an art. Keep the faith.
  • Post# 48
  • Quote
  • Feb 2, 2010 10:00pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Here is the updated pattern.dll
Attached File
File Type: zip pattern_dll_source_2010.2.3.1.zip   4 KB | 180 downloads


I changed the algorithm how the pattern's y offset is calculated. It is now like in the first version again, it is shifted so that pattern(0) always matches the current close price.

Open pattern_project.lpi in Lazarus, replace this
Inserted Code
function pattern(x: double): double; inline;
begin
  ...
end;
with your own pattern function and build the project.
  • Post# 49
  • Quote
  • Feb 3, 2010 12:42am
  • Takisd
    Joined Dec 2005 | 548 Posts | Status: I am a gosu trader
Not being a capable programmer, I thought I may congratulate you firstly. But secondly, ask whether you are interested in add patterns to your encyclopedia?

cost is only 99.95.. jokes.. Just let me know and I'll find charts for you to specify.
  • Post# 50
  • Quote
  • Feb 3, 2010 8:26pm
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
http://www.math.uiuc.edu/~rkirov2/pr...apheditor.html

With some modifications, that should work
  • Post# 51
  • Quote
  • Feb 5, 2010 6:53am
  • theorem
    Joined Jan 2009 | 37 Posts | Status: Member
I have been following this with interest as I develop in Delphi and whilst still a novice at trading I am experimenting with creating some DLL's of my own This so far has been limited to storing/accessing metatrader data in an external database but I am interested in this whole area of pattern matching etc

I have found a useful piece of software which may assist in the digitising process

http://www.datamaster2003.com/

(see attached for a screenshot I just did) You can also reference images of charts over which to make the plots although I have not tried that yet

Cheers
Attached Image
  • Post# 52
  • Quote
  • Feb 5, 2010 3:41pm
  • theorem
    Joined Jan 2009 | 37 Posts | Status: Member
Quoting 7bit
I'm going to rewrite patternmatcher.common and the pattern function itself in Pascal before i continue.

With the incredible slowness of mql4 it is almost impossible to do any reasonable number of backtests and parameter optimizations without dying from facioplegia before seeing any results. The only solution i see is having the pattern search with its two big nested loops running as optimized native machine code.

You will need to install Lazarus to modify the pattern functions and recompile the dll.
Hi 7Bit

I get the following error when trying to run your DLL version in the Tester
Attached Image (click to enlarge)
Click to Enlarge

Name: tester.jpg
Size: 43 KB
  • Post# 53
  • Quote
  • Feb 5, 2010 4:02pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting theorem
Hi 7Bit

I get the following error when trying to run your DLL version in the Tester
You must allow dll calls in the EA settings dialog. You can enable them per individual EA or globally for all EAs in the Metatrader settings. They are disabled by default.
  • Post# 54
  • Quote
  • Feb 5, 2010 7:47pm
  • Orest
    Joined Sep 2007 | 352 Posts | Status: Member
Excuse my arrogance, 7bit, but I don't understand why re-invent the wheel? ZUP indicator perfectly identifies Larry Pasavento's patterns on all time frames which believed to be profitable. Why not take that indicator and create an EA from it (I'm pretty sure a few already exist). Do you think you could manually match the patterns better? I must be missing something here.

Quoting 7bit
You must allow dll calls in the EA settings dialog. You can enable them per individual EA or globally for all EAs in the Metatrader settings. They are disabled by default.
  • Post# 55
  • Quote
  • Feb 5, 2010 9:02pm
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
Quoting Orest
Excuse my arrogance, 7bit, but I don't understand why re-invent the wheel? ZUP indicator perfectly identifies Larry Pasavento's patterns on all time frames which believed to be profitable. Why not take that indicator and create an EA from it (I'm pretty sure a few already exist). Do you think you could manually match the patterns better? I must be missing something here.
You are missing something
  • Post# 56
  • Quote
  • Feb 6, 2010 7:26am
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting Orest
Excuse my arrogance, 7bit, but I don't understand why re-invent the wheel? ZUP indicator perfectly identifies Larry Pasavento's patterns on all time frames
It's an entirely different concept. The ZUP indicator measures the ratio of distances of certain zigzag corners and can only find such type of patterns.

My dll scans for a certain (predefined but exchangeable) sequence in close prices as described in Post #1 which is an entirely different concept, it is able to find entirely different classes of patterns. It certainly cannot find all Pasavento patterns with a single pattern definition, but on the other side it can be programmed to find patterns whose shape could never be described by Pasavento's (or any other) zigzag-ratios or by a zig-zag at all.

And even if a certain pattern (a triangle for example) could very well be described by only looking at the ratios of the zigzags, there is no easy way to just exchange a small part of the ZUP code containing the complete pattern definition to make it scan for triangles instead of gartleys and butterflies. It is hard-wired and in all aspects optimized for Pasavento patterns only, while my scanner aims to be a generic scanner with an easily exchangeable pattern definition.

But maybe I will at some time in the future decide to improve the full-cushion ZUP-Wheel (not reinvent it) by making one with inflatable and exchangeable tires, a modular zig-zag-ratio scanner with exchangeable pattern definitions.

My scanners are research tools to help me identify *new* patterns instead of the well known old ones for which already scanners exist, thus they have to be extremely flexible.
  • Post# 57
  • Quote
  • Feb 6, 2010 11:31am | Edited at 11:50am
  • Orest
    Joined Sep 2007 | 352 Posts | Status: Member
I was working in similar direction some time ago, but using different approach. I build probabilistic neural network and gathered all patterns from the past, which resulted in profitable trade. I only gathered repeatable patterns and discarded one-night-stand once. I was collecting from 10 to 40 candles that formed the pattern. Then I used the collected patterns for demo trading (as soon as the pattern occurs I trade). Sounds familiar? That didn't work really. That made me thinking that market follows only well established rules, like for instance Pasavento patterns are based on Fibo proportions which are proved indicators and many traders use them.


Quoting 7bit
It's an entirely different concept. The ZUP indicator measures the ratio of distances of certain zigzag corners and can only find such type of patterns.

My dll scans for a certain (predefined but exchangeable) sequence in close prices as described in Post #1 which is an entirely different concept, it is able to find entirely different classes of patterns. It certainly cannot find all Pasavento patterns with a single pattern definition, but on the other side it can be programmed to find patterns whose shape could never be described by Pasavento's...
  • Post# 58
  • Quote
  • Feb 6, 2010 9:47pm
  • 7bit
    Joined Mar 2009 | 1,235 Posts | Status: Member
Quoting Orest
Sounds familiar? That didn't work really.
Yes, both things sound familiar. The part with the PNN and the "didn't work" part even more ;-)

So many things didn't work, but i still keep trying and *some* things already look promising. And while i keep trying to find the mechanical grail my manual trading slowly but constantly improves. :-)
  • Post# 59
  • Quote
  • Feb 7, 2010 12:35am
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
Quoting 7bit
Yes, both things sound familiar. The part with the PNN and the "didn't work" part even more ;-)

So many things didn't work, but i still keep trying and *some* things already look promising. And while i keep trying to find the mechanical grail my manual trading slowly but constantly improves. :-)
yeah i'm in the same boat... I'm sure a lot of others are too
  • Post# 60
  • Quote
  • Feb 10, 2010 2:55pm
  • sloof
    Joined Apr 2009 | 140 Posts | Status: Birejji (ビレッジ) ►FOREX◄
Do you think this could be used to search for patterns in indicators rather than just close prices?
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Platform Tech
  • /
  • pattern matching
  • Reply to Thread
    • 1 2Page 34 5
0 traders viewing now
  • More

©2013 Forex Factory, Inc. / Terms of Use / Privacy Policy

Forex Factory® is a registered trademark.

Connect

  • Facebook
  • Twitter
  • RSS

Company

  • About FF
  • FF Blog
  • Careers at FF
  • Advertising
  • Contact FF

Products

  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer

Website

  • Homepage
  • Search
  • User Guide
  • Member List
  • Online Now
  • Report a Bug