Zigzag with points
Forums › ProRealTime English forum › ProBuilder support › Zigzag with points
- This topic has 12 replies, 2 voices, and was last updated 3 years ago by Nicolas.
Tagged: zigzag
-
-
08/22/2019 at 10:33 PM #105343
Hey! I have been looking here for a ZigZag inductor that shows how many points from previous low or high.
But can’t find it.
Is there anyone who can help me with that?
Would also like to be able to set how many points it must be before there is a new zigzag.
08/29/2019 at 3:38 PM #10584109/01/2019 at 9:43 AM #10605609/01/2019 at 9:50 AM #10605709/02/2019 at 12:41 PM #106226The indicator must be separated into 2 different codes. One that plot the previous zigzag points and segments and another one that plot the actual price difference since the last point, here are the 2 codes below:
Apply them on your price chart.
12345678910111213141516171819202122zzpoint=30zzh=ZigZagPoint[zzpoint](high)zzl=ZigZagPoint[zzpoint](low)if zzh<zzh[1] and zzh[1]>zzh[2] thenhh=zzh[1]hhbar=barindex[1]diff=hh-lldrawtext("#diff#",hhbar,hh,dialog,bold,30)coloured(0,191,255)drawsegment(hhbar,hh,llbar,ll)coloured(0,191,255)endifif zzl>zzl[1] and zzl[1]<zzl[2] thenll=zzl[1]llbar=barindex[1]diff=hh-lldrawtext("#diff#",llbar,ll,dialog,bold,30)coloured(0,191,255)drawsegment(hhbar,hh,llbar,ll)coloured(0,191,255)endifreturnplot the points differences:
12345678910111213141516171819defparam drawonlastbaronly=truezzpoint=30zzh=ZigZagPoint[zzpoint](high)zzl=ZigZagPoint[zzpoint](low)if zzh<zzh[1] and zzh[1]>zzh[2] thenlast=zzh[1]endifif zzl>zzl[1] and zzl[1]<zzl[2] thenlast=zzl[1]endifdiff=abs(close-last)drawtext("#diff#",barindex,high+AverageTrueRange[14](close),dialog,bold,30)coloured(0,191,255)returnBecause of the repainting nature of zigzag, the last segments could retrace itself repeatedly over time, so you’ll have to reload the chart once in a while.
1 user thanked author for this post.
09/02/2019 at 8:30 PM #10626703/08/2020 at 12:47 PM #12147803/09/2020 at 10:51 AM #12153307/14/2021 at 1:52 PM #17362607/15/2021 at 8:51 AM #173654please respect the posting rules, the topic is in english, I translated your reply.
The code plots the difference between the 2 last zigzag points, in price format, if you want it to be converted into point, divide it by POINTSIZE (see attached example).
07/15/2021 at 2:09 PM #17367307/15/2021 at 2:38 PM #17367407/15/2021 at 2:41 PM #173675 -
AuthorPosts
Find exclusive trading pro-tools on