Hull Moving Average – take orders when rising or falling

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #117248 quote
    MajellanMajellan
    Participant
    Average

    Hello,

    Is it possible to create a program in ProRealtime which uses the Hull Moving Average – Uptrend and Downtrend settings – to open and close orders automatically?

    Thank you.

    M

    #117251 quote
    nonethelessnonetheless
    Participant
    Master

    Yes, I use it a lot:

    Period= 20 //for example
    inner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)
    HULL = weightedaverage[round(sqrt(Period))](inner)
    c1 = HULL > HULL[1] //uptrend
    c2 = HULL < HULL[1] //downtrend
    Paul and Nicolas thanked this post
    #117263 quote
    MajellanMajellan
    Participant
    Average

    Thank you, much appreciated!

    #117308 quote
    NicolasNicolas
    Keymaster
    Legend

    Something similar with a more complete code and explanation: Place orders when a curve change colour

    #117340 quote
    nonethelessnonetheless
    Participant
    Master

    I should have explained, c1 = HULL > HULL[1] in the above code only means that the Hull MA is rising; as a long entry condition it would buy at any point on that rising line.

    If you want to enter only at the point where the Hull MA changes direction then you should use the code in Nicolas’ example:

    c1 = HULL > HULL[1] and HULL[1]<HULL[2]//bullish turnaround
    c2 = HULL < HULL[1] and HULL[1]>HULL[2]//bearish turnaround
    Paul thanked this post
    #117470 quote
    MajellanMajellan
    Participant
    Average

    Thank you

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Hull Moving Average – take orders when rising or falling


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Majellan @pbateson9 Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by MajellanMajellan
6 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/19/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...