## Triangle and Wedges Patterns recognition

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

### Triangle and Wedges Patterns recognition

Triangles often form as uncertainty fills the market, and traders are unsure in which direction is market moving.
Triangle are continuation patterns, represent lines of supply and demand.
But modern technical analysis is not limited by this narrow description.
There are three different types of triangles, Ascending triangle, the Descending triangle and the Symmetrical triangle.
Because of their similarities, we can add them, and growing or declining Wedge pattern.

If confirmed, the main application of the triangle pattern is to give price targets.
The direction the trend is determined by the direction of breakout.

An example of entry signals and exit target obtained using this this method.
Time frame a few weeks, max. profit over 1000 pips.

There are some basic validation rules.
1.The pattern upper and lower sloping trendlines must have at least two points of confirmation.
2. Volume usually decreases as the pattern progresses and increases at the point of breakout, forming wide spread candle.
3. Market (Closing price) "must" respect the pattern.
4.Closing price above the trendline in a bullish pattern and below the trendline in bearish chart pattern.
5.Strong pattern breake through the trend line in the first 2 / 3 of pattern.

Triangle.lua

This is an indicator that we've written a few months ago,
one of the first indicators that I have help to write, One of the most valuable.
I did almost forget and lost It.

Apprentice
FXCodeBase: Confirmed User

Posts: 20840
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Triangle and Wedges Patterns recognition

Hi! Thanks a lot! Maybe this is what I've been looking for for a long time...
Now that I'vetasted blood, I have some short questions:
Can you explain the parameters "Max. Base/ Side Ratio" and "Max. Side / Side Ratio" and the "Frame Size"?
Is it possible to play a configurable Soundfile, when a triangle is drawn?
Is it possible to draw the price target in a way you did it in your sample chart?
Is ist possible to play the sound only if a certain condition is met - for example RSI is in a Range between 35 and 65?

I would be very thankful for an answer. Perhaps you can give me some sample lines of code, if you haven't the time to work on some of my audacious requests - I'm a programmer and could try it on my own like a script kiddy...

Again, thanks a lot!

schnuggelbugge
schnuggelbugge

Posts: 5
Joined: Wed Jan 12, 2011 10:15 am

### Re: Triangle and Wedges Patterns recognition

First, this is one of the first things I wrote, helped write.

You can try of course.

Code is available here just opened it using any text editor.

The parameters are used in the comparison of triangles.

Base - Open, Or No Line Triangle Side
Side - Triangle Side indicated by Triange line, lines.

Frame Size -Length of time in which we seek triangle pattern.

Apprentice
FXCodeBase: Confirmed User

Posts: 20840
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Triangle and Wedges Patterns recognition

Triangle.lua

I presented an additional option, Lookback Search lengt,
which defines the Triangle searching area starting from last candle.
In order to improve performance.

Apprentice
FXCodeBase: Confirmed User

Posts: 20840
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Triangle and Wedges Patterns recognition

You mentioned..."If confirmed, the main application of the triangle pattern is to give price targets.
The direction the trend is determined by the direction of breakout
." but I don't see it on the chart. I see the triangles, wedges and etc but price targets?
Attachments
compulsive

Posts: 30
Joined: Mon Jan 17, 2011 2:39 pm

### Re: Triangle and Wedges Patterns recognition

This is normal and expected.
In this version, the indicator does not give price targets.

Price target example I have added only as an example.

Apprentice
FXCodeBase: Confirmed User

Posts: 20840
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Triangle and Wedges Patterns recognition

Is there a strategy for this? I think it would be a good development idea. The trade could be placed on a retest of the triangle in the appropriate direction?
shinobi_brian

Posts: 5
Joined: Sat Oct 09, 2010 8:32 am

### Re: Triangle and Wedges Patterns recognition

hi apprendice,

can you create strategy based on this indicator.

superleo

Posts: 81
Joined: Mon Oct 17, 2011 5:45 am

### Re: Triangle and Wedges Patterns recognition

Such a thing is possible.

Apprentice
FXCodeBase: Confirmed User

Posts: 20840
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Triangle and Wedges Patterns recognition

Does this in fact identify wedges also? That would be very desirable behavior. In fact, if you could also add channels while you are at it it would deal with all three circumstances: paralle, converging,l diverging. Thanks alot!
rshoemake

Posts: 5
Joined: Sun Mar 18, 2012 8:00 pm

Next