hull ma in indicator code

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #86086 quote
    Mert
    Participant
    Average

    Hello,

     

    I have a HULL moving average in my chart and am trying to use it as a condition in my code. Unfortunately I can not find the right words to describe the HULL MA. if I use average it is ok but it seems not to recognise an average being a HULL one.

     

    Can someone help or advice me?

    Thanks in advance

     

    Mert

    #86088 quote
    Vonasi
    Moderator
    Master
    Period = 20
    
    HullAverage = WeightedAverage[ROUND(SQRT(close))](2 * WeightedAverage[ROUND(Period / 2)](close) - WeightedAverage[Period](close))

    You can find the calculations for many different averages within this indicator code:

    Average Filter Regression

    #86090 quote
    Mert
    Participant
    Average

     

    Thanks Vonasi.

     

    I have various codes for the HULL ma. The problem is that if I want to write code like: HULLMA current period crosses over HULLMA previous period the description of the HULLMA seems not to be recognised by the software.

    #86095 quote
    Vonasi
    Moderator
    Master

    There is no built in Hull MA in PRT so you have to hard code it into your strategy.

    Period1 = 20
    Period2 = 50
    
    HullAverage1 = WeightedAverage[ROUND(SQRT(close))](2 * WeightedAverage[ROUND(Period1 / 2)](close) - WeightedAverage[Period1](close))
    HullAverage2 = WeightedAverage[ROUND(SQRT(close))](2 * WeightedAverage[ROUND(Period2 / 2)](close) - WeightedAverage[Period2](close))
    
    If HullAverage1 crosses over HullAverage2 then
    buy 1 contract at market
    endif
    #86097 quote
    Mert
    Participant
    Average

    Ok. Thanks a lot.

    #86098 quote
    robertogozzi
    Moderator
    Master

    There’s no built-in HULL MA by itself, but clicking on the properties of MA ypou can select HULL to be displayed (only) on charts.

    Oddly enough ProOrder does not recognize average types beyond 6 with AVERAGE[Periods,Type] and reports an error if you write 8 as type!

    #86101 quote
    Vonasi
    Moderator
    Master

    Oddly enough ProOrder does not recognize average types beyond 6 with AVERAGE[Periods,Type]

    I thought that it was above 7 not 6?

    Not having 8 and 9 is almost as if someone put them in the platform but then never told the person responsible for putting them in ProOrder that they had done it!

    #86103 quote
    robertogozzi
    Moderator
    Master

    Lack of communication 😀

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

hull ma in indicator code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Mert @mert Participant
Summary

This topic contains 7 replies,
has 3 voices, and was last updated by robertogozzi
7 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/30/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...