Everyone knows that triangle pattern means consolidation and breakout afterwards. I am quite sure a lot people are using this technique during manual trading. However, I wonder has anyone Succeeded in using Triangle pattern on algo trading?
I know it is hard coz it involves subjective recognition by human’s mind, but is it that hard to write an algo which can recognize triangle pattern?
Find the Swing high/low within a certain period of time
use linear regression model to find the best fit line of the upper and lower line respectively
make fine adjustment to the regression line (maybe shift the line upwards/downwards to make most of the swing high/low points within the triangle boundary)
Express the relationship of price and time, place stop order/market order while price breakout of those lines (with Volume maybe).
It seems the above logic might involve the use of loops which i am not good at, is anyone willing to help ?
I also studied this configuration of the markets, therefore I created this indicator that detects triangles but also channels, by using a framewok that I developed for prorealtime that allowed me to create many pattern indicators, which you can find here: https://www.automatictrading.it
For this indicator, I decided to use the maximum and minimum points of the ZigZag%, because it is an easy and universal indicator, so you could also use that same idea
The indicator detects the trend lines like the human eye would do, calculates and draws them.
The indicator does not limit itself to drawing them, but it is able to detect the trend line breakout, generating signals.
The signals can be used in all Prorealtime applications, such as ProScreener, ProOrder, Probacktest, and Probuilder, to continue the evolution of the indicator.
In the indicator’s setting I added details to manage graphical aspects.
In this video I show you how the indicator works, I wish you good luck for your programming.
That’s right, this is indeed impossible to use Zigzag in ProOrder if you use the platform’s instruction. So I recoded it from scratch in order to get its full functionnalities in any of the platform’s tools, like ProOrder in order to create automated trading programs. But, zigzag is just highest (top) and lowest (bottom) points of the last desired period, so you can call it what ever you want!
I prepared this example to show you that it actually works, I created this very trivial example strategy, to show you the trade on breaks.(please find pictures attached below)
To facilitate understanding, the indicator also shows past triangles!
Thanks
Ale
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue