Source: https://fxcodebase.com/code/viewtopic.php?f=17&t=1643
Forum: 17 · Topic 1643 · 49 post(s)
Apprentice · Mon Aug 02, 2010 12:10 pm

Triangles often form as uncertainty fills the market, and traders are unsure in which direction is market moving. Triangles 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, the 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 of the trend is determined by the direction of the breakout.
An example of entry signals and exit target obtained using 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.
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.
MT4/MQ4 version. viewtopic.php?f=38&t=70457
Indicator based strategy. viewtopic.php?f=17&t=67122
schnuggelbugge · Wed Jan 12, 2011 10:41 am
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
Apprentice · Wed Jan 12, 2011 2:27 pm
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 · Mon Jan 17, 2011 12:39 pm
I presented an additional option, Lookback Search lengt, which defines the Triangle searching area starting from last candle. In order to improve performance.
compulsive · Mon Jan 17, 2011 4:44 pm
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?
Apprentice · Mon Jan 17, 2011 5:41 pm
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.
shinobi_brian · Wed Jan 26, 2011 4:27 pm
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?
superleo · Sun Dec 04, 2011 9:31 pm
hi apprendice,
can you create strategy based on this indicator.
Apprentice · Tue Dec 06, 2011 3:17 am
Such a thing is possible.
rshoemake · Sun Mar 17, 2013 10:33 am
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!
Apprentice · Mon Mar 18, 2013 4:05 am
Wedges are also supported.
rshoemake · Mon Mar 18, 2013 5:59 am
What about channels?
Apprentice · Tue Mar 19, 2013 9:33 am
Can you attach a chart with examples of these channels. Which algorithm is used for channel calculation.
speakinmymind · Fri Mar 29, 2013 1:49 am
can you add the ability to adjust size of lines?
speakinmymind · Fri Mar 29, 2013 2:01 am
could you add a parameter to set a minimum lookback period? I am trying to create a min and max lookback that will set the range for the size of triangles to be displayed
It may be better to set an option to only display triangles of a certain size, the size being in pips or something better.
Apprentice · Fri Mar 29, 2013 1:03 pm
Your request is added to the development list.
Apprentice · Fri Mar 29, 2013 1:13 pm
Line Style Options Added.
speakinmymind · Sat Mar 30, 2013 9:51 pm
This would be GREAT as a MTF!! if you could put the triangles from each larger timeframe on the chart in different colors it would be very useful!!
Apprentice · Mon Apr 01, 2013 7:12 am

Please use, Data Source Period menu to select other Time Frames.
speakinmymind · Tue Apr 02, 2013 9:11 am
Oh, wow I got it. Thanks!
Can you add the ability for the triangles to automatically change to “ask” properties when the chart is on ask? I don’t see an option to set to ask prices at all.
speakinmymind · Thu Jun 13, 2013 3:26 pm
Could you please develop an oscillator version of this?
Apprentice · Mon Jun 17, 2013 5:39 am
Can you explain, I’m not sure that I understand U.
speakinmymind · Wed Jun 19, 2013 7:13 am
I would like to use a different data source than price, such as macd or MVA .
Apprentice · Sun Jun 23, 2013 2:28 pm
Your request is added to the development list.
Jamwal Suriya · Thu Jun 27, 2013 1:11 am
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?
Apprentice · Fri Jun 28, 2013 2:35 am
Unfortunately not. I have planned it, unfortunately I have not found the time for this task.
speakinmymind · Tue Jul 23, 2013 4:23 pm
Is there any update in regards to using a MVA as the data source?
refresc0 · Mon Apr 28, 2014 12:58 am
this a great indicator very useful and well thought of. i will try to turn it into a strategy to open positions and let you know whether it works or not.
rose123 · Mon Sep 14, 2015 1:08 pm
hi apprendice, can you create mtf mcp screener to identry triagle and wedge pattern
if there is triangle formation then draw “T” if there is wedge formation then draw “W’
Apprentice · Tue Sep 15, 2015 3:53 am
Your request is added to the development list.
mulligan · Tue Nov 29, 2016 1:34 pm
This is a very handy indicator. Is it possible to have an alert when any of the chosen patterns appears on the chart? That way we can be alerted to watch where price action crosses the pattern and make buy, sell, or hold decisions.
Thanks
Apprentice · Thu Dec 01, 2016 4:08 am
Your request is added to the development list, Under Id Number 3683 If someone is interested to do this task, please contact me.
Alexander.Gettinger · Tue Nov 21, 2017 5:26 pm
mulligan wrote: This is a very handy indicator. Is it possible to have an alert when any of the chosen patterns appears on the chart? That way we can be alerted to watch where price action crosses the pattern and make buy, sell, or hold decisions.
Thanks
Please, try this version of the indicator with alerts.
seunboi4u · Sun Nov 26, 2017 9:22 pm
Triangle and Wedges Patterns recognition….please can you help with MT4 not only Lua language thanks
Apprentice · Mon Nov 27, 2017 12:26 pm
Your request is added to the development list under Id Number 3961
Apprentice · Sun Apr 22, 2018 5:47 am
The Indicator was revised and updated.
ANTONIO · Wed Sep 11, 2019 1:33 pm
Hi, the indicator Triangle with alert does not work correctly and does not send emails and shows up the message “false a new triangle has formed”
Thank you
Apprentice · Thu Sep 12, 2019 8:04 am
Your request is added to the development list. Development reference 75.
Apprentice · Fri Sep 13, 2019 4:11 am
I don’t see any issues with alerts
kwakugyau · Thu Jul 23, 2020 10:36 am
Is there an mq4 version for this Triangle_With_Alert? MQ4 version will be great. Thank you.
Apprentice · Fri Jul 24, 2020 7:29 am
Your request is added to the development list. Development reference 1762.
Apprentice · Fri Sep 18, 2020 8:09 am
MT4/MQ4 version. viewtopic.php?f=38&t=70457
fxlion · Thu Nov 19, 2020 10:57 am
HI APPRENDICE,
CAN U CREATE STRATEGY BASED ON THIS INDICATOR
BUY: PRICE CROSSES UP OVER UPPER LINE SELL: PRICE CROSSES BOTTOM LINE
THANK U
Apprentice · Thu Nov 19, 2020 2:46 pm
Your request is added to the development list. Development reference 2331.
Apprentice · Fri Nov 20, 2020 4:12 am
Try this version. viewtopic.php?f=17&t=67122
fxlion · Fri Nov 20, 2020 6:08 am
Apprentice wrote: Try this version. viewtopic.php?f=17&t=67122
hi apprendice,
this is indicator having trading option
i request strategy based on this indicatior.
thank u
fxlion · Fri Nov 20, 2020 10:19 pm
fxlion wrote: HI APPRENDICE,
CAN U CREATE STRATEGY BASED ON THIS INDICATOR
BUY: PRICE CROSSES UP OVER UPPER LINE SELL: PRICE CROSSES BOTTOM LINE
THANK U
my request is to change this Triangle and Wedges Patterns recognition indicator optimised for strategy like trend demark indicator as beloW
viewtopic.php?f=17&t=2483&hilit=Demark+Trend+Lines
then create strategy based on that indicator as folloW
viewtopic.php?f=31&t=65015&p=114367&hilit=trend+demark#p114367
thank u
Apprentice · Sun Nov 22, 2020 4:50 am
Your request is added to the development list. Development reference 2342.
Apprentice · Mon Nov 23, 2020 2:19 pm
Unfortunately, there is no easy way to convert it to a strategy. But you can backtest in the simulator