Head and Shoulders equity curve stop loss

Forums ProRealTime English forum ProOrder support Head and Shoulders equity curve stop loss

Viewing 12 posts - 1 through 12 (of 12 total)
  • #33532
    Maz

    Hi,

    I put together a quick and dirty H&S pattern detection for PRT and thought to share it here, in case it’s of use to anyone, or in case someone would like to improve or contribute. I am sure you are probably aware of the head and shoulders pattern and its uses – but if not then take a look here.

    Below is the raw beginnings of a module that can be plugged into a trading system. It looks roughly for head and shoulders patterns with the equity curve when your system is onMarket. If a head and shoulders pattern is found within your equity curve, a trigger will happen (“hsDone”) and you can then perform an action (such as exit the open trade to lock in profits, or any other action).

    The code should be pretty self explanatory but it’s by no means a finished product. I don’t have time to go though all the logic cases, filters and variables at the moment but thought to share in case someone would like to pick it up and contribute. Open to all ideas of improving the H&S detection algo. Will pick up on it myself when I have more time.

     

    All the best,

    M

    3 users thanked author for this post.
    #33537
    ALE

    Very interesting!

    1 user thanked author for this post.
    avatar Maz
    #33548

    Why are you using Positionperf instead of High or Close of candlesticks? Since Positionperf is updated only once per bar, I presume the pattern found result should be the same.

    But it’s a great idea and good share, thanks a lot Maz.

    1 user thanked author for this post.
    avatar Maz
    #33571
    Maz

    Yep, as an example. But you could always do something like:

    (or simply close)

    1 user thanked author for this post.
    avatar ALE
    #33698

    Intresting!

    1 user thanked author for this post.
    avatar Maz
    #41288
    ALE

    Hello Maz
    could be possible to change the code in a breakout strategy on the neck level?

    #49051

    Hello Maz,

     

    is it possible to transform the system to a simple screener?

     

    Regards,

    Nicolas

    #49065
    Huw

    I’m thinking it could be an idea to adapt this for a reverse head and shoulders as well as double tops and double bottoms for a breakout strategy?

    #49230

    This is very cool, thanks Maz. Great work. Ill definitly try to adapt this into some of my strats and see if it would make a difference for my equity 🙂 Right off the bat this was fun to see! Attached screenshot of the clear difference, although in this example, holding it would actually give me a few pips extra haha.

    #112925

    Hi Maz.

    Is it possible to make a head and sholders screener?

    Would like it to find the pattern before it is completed.

    When the price is at the same level as the top or bottom of the left shoulder.

    #112927

    Maz hasn’t been seen around these parts (to my knowledge?) for quite some time.

    Also you can’t strictly see a head and shoulders pattern until it is complete … but I know what you mean … get in early like!? 🙂

    #112966

    Yes I am aware that it is not possible to see head and shplders until it is shaped.

    I am posting a new image of a Quasimodo pattern. The difference is that it does a lower low before the right shoulder.

    It would not be impossible to do a screener of such in an early stage.

    So a screener when price forms a higher high => higher kow => higher high => lower low.

    Before the right shoulder is formed.

    The idea is to go short on the top of the left shoulder when the right shoulder is formed.

    Hope you understand what I mean

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

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