I’ve create a code which can detect the lows (on the screenshot they are represating by the arrows).
1
2
3
4
5
6
7
8
9
10
11
12
zz=zigzag[2](low)
creux=zz[0]>zz[1]andzz[1]<zz[2]
b=zz[1]
ifcreuxthen
oldbar=barindex-1
DRAWARROWUP(oldbar,b-0.1)
DRAWSEGMENT(oldbar,b,oldbar[1],b[1])
endif
return
Now I’m trying to connect the last low to his previous one by a segment but as you can see it does no’t work :/ ! So i’ve made a mistake in the code but i can’t find where is the mistake …