ZigoParticipant
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.
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).
ZigoParticipant
Master
Thanks for programming so well Roberto.
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.
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
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]