Hull Moving Average – take orders when rising or falling

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #117248 quote
    Majellan
    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
    nonetheless
    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
    Majellan
    Participant
    Average

    Thank you, much appreciated!

    #117308 quote
    Nicolas
    Keymaster
    Master

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

    #117340 quote
    nonetheless
    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
    Majellan
    Participant
    Average

    Thank you

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

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 Majellan
6 years, 1 month ago.

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