ZigZag with cumulative volume
Forums › ProRealTime English forum › ProBuilder support › ZigZag with cumulative volume
- This topic has 48 replies, 3 voices, and was last updated 2 years ago by Nicolas.
-
-
03/02/2017 at 2:20 PM #2693103/02/2017 at 4:06 PM #2694503/05/2017 at 2:10 AM #2717503/18/2017 at 7:34 PM #2903604/12/2017 at 4:26 AM #31812
Hello,
I’d like to build a screener based on this indicator to be triggered when the value goes from negative to positive, but it doesn’t work. Can you please help me to do so. I used the PRC-Zig version of @melenova.
Here is my code :
indicator1 = CALL “PRC-Zig”
c1 = (indicator1[1] <= 0)
c2 = (indicator1 >= 0)
SCREENER[c1 AND c2] ((close/DClose(1)-1)*100 AS “% Veille”)Yacine
My PRT level : (very) beginner
04/12/2017 at 8:59 AM #31820The indicator melenova has posted don’t return any variable, so you can’t use it like the way you did. Since this indicator is only made of zigzag, your query is only to find peak and trough of this indicator. So this kind of code snippet below should do the trick:
123456789// --- parameterspercentVariation = 5ww = ZigZag[percentVariation](close)peak = ww<ww[1] and ww[1]>ww[2]trough = ww>ww[1] and ww[1]<ww[2]screener[peak or trough]04/12/2017 at 7:10 PM #3188601/10/2018 at 10:06 PM #58926Good evening, would it be possible to consider another mode of operation of this indicator other than ZigZag?
The ZigZag repaints enormously (Image Joint). And this is only a small example because in some trading sessions, without recurring refreshments the indicator becomes completely illegible!
Refresh permanently its graphics, while we receive a stream in real time, it’s a bit annoying anyway 🙂01/10/2018 at 10:36 PM #5893101/11/2018 at 2:13 AM #58950I do not really have any idea to tell the truth, I counted a little on you …;)
However PRT’s classic ZigZag indicator proposes a version in% and another in units! Could this solve the problem with a cumulative zigzag version Volume in Units ??
01/11/2018 at 11:05 AM #58974Even with units based ZigZag, the information should “repaint”, that’s the default and normal behavior of zigzag!
That’s why I created the now “famous” 😆 Fractals ZigZag indicator, this one needs X bars confirmation before adding new peak or new through.
03/03/2018 at 1:59 PM #64278Here is the version with negative Volumes when the last zigzag was a peak.
1234567891011121314151617181920212223242526272829303132333435363738//PRC_CumulativeVolume ZigZag | indicator//17.02.2017//Nicolas @ http://www.prorealcode.com//Sharing ProRealTime knowledge// — parameters// percentVariation = 9zz = ZigZag[percentVariation](close)peak = zz<zz[1] and zz[1]>zz[2]tough = zz>zz[1] and zz[1]<zz[2]if color=1 thencumV = cumV+volumeelsecumV = cumV–volumeendifif peak thentext = cumV/1000drawtext(“#text#K”,barindex[1],cumV[1]+0.17*cumV[1],Dialog,Bold,12) coloured(0,200,0)drawsegment(barindex[1],cumV[1]+0.20*cumV[1],previousX,previousY)cumV = –Volumecolor = –1previousX = barindex[1]previousY = cumV[1]+0.20*cumV[1]elsif tough thentext = cumV/1000drawtext(“#text#K”,barindex[1],cumV[1]+0.23*cumV[1],Dialog,Bold,12) coloured(200,0,0)drawsegment(barindex[1],cumV[1]+0.20*cumV[1],previousX,previousY)cumV = Volumecolor = 1previousX = barindex[1]previousY = cumV[1]+0.20*cumV[1]endifreturn cumV coloured by colorWhat’s the meaning of those factors 0.17 and 0.20 that multiply cumV[1]?
03/03/2018 at 8:29 PM #64315Forget previous question (I understand that they are only the x and y coordinates where to write the “text”)
But why does the “text” take into account also the volume of next bar? This leads to a text different from the real cumulated volume (as shown in the attached pic)
04/27/2020 at 9:27 AM #128340Does the ZigZag function retrieve data from the future (as in Metastock) or is it based only on historical data?
04/27/2020 at 10:18 AM #128363 -
AuthorPosts
Find exclusive trading pro-tools on