Higher High and Lower Low tracking

Viewing 6 posts - 31 through 36 (of 36 total)
  • Author
    Posts
  • #171862 quote
    ZigoZigo
    Participant
    Master

    @RobertoGozzi

    I already understood the indicator, but I wonder only about the next plot after LH1 and HL1 and I find out on the next pictures. The lower highs, comes together as well as the Higher Lows do.

    HHLL-11.png HHLL-11.png HHLL-12.png HHLL-12.png
    #171868 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    As I said I don’t know why that happens. I think it’s due to ProBuilder refreshing multiple times.
    I even asked to detect any Higher or Lower High if there’s been a Higher or Lower Low in between, but it seems not to work (and the other way round, as well).

    lazybaby thanked this post
    #171875 quote
    ZigoZigo
    Participant
    Master

    Thanks for programming so well Roberto.

    robertogozzi thanked this post
    #171965 quote
    lazybabylazybaby
    Participant
    New

    Thanks Roberto, really appreciate your work on this, I still have a strange drawing pattern on my screen where all the HH LL etc. are stuck to the right of my screen but not a problem I can try and use the variable values.

    #241526 quote
    HencheyHenchey
    Participant
    Junior

    Hi Roberto

    Thanks for creating and sharing this code. Would you be able to advise if it’s possible to develop a screener using this code, to scan for three consecutive lower lows before a higher low?

    Many thanks

     

    Pete

    #241898 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I have tried this one, but I can’t get any result:

    ONCE N      = 4                  //4  number of tags (for each side)
    ONCE Offset = 1                  //0, 1, etc...  ID of the bar uset to check prices
    ONCE LO     = 0
    ONCE HI     = 0
    myHL        = 0
    N           = max(4,N)
    // initialize arrays
    IF BarIndex = 0 THEN
    FOR i = 1 TO N
    $hh[i]    = 0              //Higher High
    $hhBar[i] = 0
    $lh[i]    = 0              //Lower  High
    $lhBar[i] = 0
    $ll[i]    = 9999999        //Lower  Low
    $llBar[i] = 0
    $hl[i]    = 9999999        //Higher Low
    $hlBar[i] = 0
    $myLL[i]  = 0
    NEXT
    ENDIF
    //-------------------------------------------------------------------------------
    // check higher highs
    IF (close[Offset] > close[Offset+1]) AND (close[Offset] > $hh[1]) AND HI = 0 AND BarIndex <> $hhBar[1] THEN
    FOR i = N DOWNTO 2
    $hh[i]    = $hh[i - 1]
    $hhBar[i] = $hhBar[i - 1]
    $myLL[i]  = $myLL[i - 1]
    NEXT
    $hh[1]    = close[Offset]
    $hhBar[1] = BarIndex[Offset]
    $myLL[1]  = 0
    HI = 1
    LO = 0
    //-------------------------------------------------------------------------------
    // check lower lows
    ELSIF (close[Offset] < close[Offset+1]) AND (close[Offset] < $ll[1]) AND LO = 0 AND BarIndex <> $llBar[1] THEN
    FOR i = N DOWNTO 2
    $ll[i]    = $ll[i - 1]
    $llBar[i] = $llBar[i - 1]
    $myLL[i]  = $myLL[i - 1]
    NEXT
    $ll[1]    = close[Offset]
    $llBar[1] = BarIndex[Offset]
    $myLL[1]  = $ll[1]
    HI = 0
    LO = 1
    //-------------------------------------------------------------------------------
    // check lower highs
    ELSIF (close[Offset] > close[Offset+1]) AND (close[Offset] < $hh[1]) AND HI = 0 AND BarIndex <> $lhBar[1] THEN
    FOR i = N DOWNTO 2
    $lh[i]    = $lh[i - 1]
    $lhBar[i] = $lhBar[i - 1]
    $myLL[i]  = $myLL[i - 1]
    NEXT
    $lh[1]    = close[Offset]
    $lhBar[1] = BarIndex[Offset]
    $myLL[1]  = 0
    HI = 1
    LO = 0
    //-------------------------------------------------------------------------------
    // check higher lows
    ELSIF (close[Offset] < close[Offset+1]) AND (close[Offset] >= $ll[1]) AND LO = 0 AND BarIndex <> $hlBar[1] THEN
    myHL = 1
    FOR i = N DOWNTO 2
    $hl[i]    = $hl[i - 1]
    $hlBar[i] = $hlBar[i - 1]
    $myLL[i]  = $myLL[i - 1]
    NEXT
    $hl[1]    = close[Offset]
    $hlBar[1] = BarIndex[Offset]
    $myLL[1]  = 0
    HI = 0
    LO = 1
    ENDIF
    //-------------------------------------------------------------------------------
    // scan 3 previous Lower Lows before the current Hiogher Low
    Cond = 0
    IF myHL THEN
    FOR i = 2 TO N
    IF (i > 4) THEN
    break
    ENDIF
    IF ($myLL[i] > 0) THEN
    Cond = Cond + 1
    ENDIF
    NEXT
    ENDIF
    IF Cond <> 3 THEN
    Cond = 0
    ENDIF
    SCREENER[Cond]
Viewing 6 posts - 31 through 36 (of 36 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

Higher High and Lower Low tracking


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
lazybaby @lazybaby Participant
Summary

This topic contains 35 replies,
has 4 voices, and was last updated by robertogozzirobertogozzi
1 year, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/25/2021
Status: Active
Attachments: 25 files
ProRealCode ProRealCode
Loading...