HULL MA strategy orders lagging

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #115203 quote
    Vonasi
    Moderator
    Master

    A bottom would be:

    if c1 and c2[1] then

    and a top would be:

    if c2 and c1[1] then
    #115204 quote
    nonetheless
    Participant
    Master

    This thing is, I still think like a manual trader! These first efforts were really just trying to replicate what I do in day trading and Hull18 on a 2.5m FTSE chart is actually quite reliable as a turnaround, in conjunction with other slower trend indicators.

    Whether or not it’s a good strategy for ProOrder (prob not!) isn’t really the issue here.

    What I’m trying to figure out is, if I have coded c1 = hull > hull[1] why am I getting c1 = hull > hull[2] ???

    #115206 quote
    nonetheless
    Participant
    Master

    A bottom would be: if c1 and c2[1] then 1 if c1 and c2[1] then and a top would be: if c2 and c1[1] then 1 if c2 and c1[1] then

    Thanks Vonasi, i’ll try that.

    #115245 quote
    Nicolas
    Keymaster
    Master

    No, you only need the last 3 values to detect a peak or a trough:

    top = hull<hull[1] and hull[1]>hull[2]
    bottom = hull>hull[1] and hull[1]<hull[2]
    nonetheless thanked this post
    #115256 quote
    Vonasi
    Moderator
    Master

    I just adapted the original conditions in the code to achieve exactly the same as your code Nicolas. It just checks the rising or falling condition for the last two candles.

    c1 = hull > hull[1] //rising
    c2 = hull < hull[1] //falling
    
    //bottom is rising after falling
    if c1 and c2[1] then
    
    //top is falling after rising
    if c2 and c1[1] then
    nonetheless thanked this post
    #115261 quote
    Nicolas
    Keymaster
    Master

    No problem, I replied this morning without have read your most recent replies!

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

HULL MA strategy orders lagging


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 20 replies,
has 4 voices, and was last updated by Nicolas
6 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/17/2019
Status: Active
Attachments: 2 files
Logo Logo
Loading...