Has Anyone Succeeded in using Triangle pattern on algo trading?

Forums ProRealTime English forum ProOrder support Has Anyone Succeeded in using Triangle pattern on algo trading?

  • This topic has 5 replies, 4 voices, and was last updated 4 years ago by avatarALE.
Viewing 6 posts - 1 through 6 (of 6 total)
  • #105807

    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?

    #105808

    My Preliminary idea:

    1. Find the Swing high/low within a certain period of time
    2. use linear regression model to find the best fit line of the upper and lower line respectively
    3. 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)
    4. 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 ?

    #105819

    This indicator might be of interest:

    https://www.prorealcode.com/prorealtime-indicators/1-2-3-pivots-support-and-resistance-lines/

    Not exactly what you ask for but it might help a little to understand the issues.

    #105842
    ALE

    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.

    Ale

    #105879

    Hello Ale if I remember well you can’t use a signal based on zigzag in ProOrder, or am I wrong?

    #105895
    ALE

    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

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login