3 versions of the Hull Average

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #158426 quote
    Nicolas
    Keymaster
    Master

    Erratum, it is 7 and not 8 and they are together the same.

    return average[20,7](typicalprice),HullAverage[20](typicalPrice)

    The difference with the coded version could come from the rounding of the period.

    nonetheless thanked this post
    #158478 quote
    robertogozzi
    Moderator
    Master

    Predefined MM HULL (20 periods) uses TYPICALPRICE and matches exactly my two custom indicators:

    Period = 20
    src    = CustomClose
    x1     = WeightedAverage[Period](src)
    x2     = (2 * WeightedAverage[round(Period/2)](src)) - x1
    HullMA = WeightedAverage[round(sqrt(Period))](x2)
    RETURN HullMA
    p = 20
    RETURN average[p,7](TypicalPrice)

    Predefined HULL MOVING AVERAGE (20 periods) uses CLOSE , so it cannot match the other two. If you use CLOSE also with the other predefined MM HULL (and custom ones) they will match.

    The difference is not due to rounding.

    x-6.jpg x-6.jpg
    #158492 quote
    nonetheless
    Participant
    Master

    does CustomClose not need to be defined?

    #158498 quote
    robertogozzi
    Moderator
    Master

    Using CustomClose implies the properties to ask users what price they want the indicator to be applied to (a dropdown list will allow you to select Close, Low, High, Open, TypicalPrice. MedianPrice, ….).

    nonetheless thanked this post
Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.

3 versions of the Hull Average


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 18 replies,
has 5 voices, and was last updated by robertogozzi
5 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/18/2021
Status: Active
Attachments: 9 files
Logo Logo
Loading...