Pivot Point Hi Low Indicator?
Forums › ProRealTime English forum › ProBuilder support › Pivot Point Hi Low Indicator?
- This topic has 14 replies, 4 voices, and was last updated 7 years ago by zuzito28.
-
-
08/29/2016 at 12:01 PM #12382
Thank you in advance for looking at this post. I have been trying to code an indicator that only shows the last highest high of 7 days and only the lowest low of 7 days with an arrow up or down. The code i have so far is below, but it does not look correct. Can anyone here see what i am doing wrong. Once I get it right, i want to add a moving average to the indicator to return a chart that looks something like:
https://www.youtube.com/watch?v=kVyMj1zDHCY
Current Code:
1234567891011121314PPH = highest [7] (high)PPL = lowest [7] (low)if pph [0] > high [7] thenDRAWARROWDOWN(barindex[1],high[1])coloured(255,10,10)endifif ppl [0] < low [7] thenDRAWARROWUP(barindex[1],low[1])coloured(10,255,10)endifa = pphb = pplRETURN a COLOURED (0,255,255) as "weightedaverage [1]", b COLOURED (0,255,255) as "weighted average [1]"Also attached is a picture of what the chart looks like with this code. HELP!!????
08/29/2016 at 2:55 PM #1239008/30/2016 at 12:03 PM #12462Hi Nicolas,
I am wanting to identify the highest high of the past 7 days and the lowest low of the past seven days. I then want to apply a line/segment or moving average to those points as is shown in the youtube link. I also want to create a CMO indicator that is based on the highs and lows of the created indicator. I have tried to code this myself, but lack the coding knowledge to achieve this. The nearest i have been able to achieve is a segment on a the high. Any ideas?
Regards,
Travis
08/30/2016 at 3:32 PM #1246608/30/2016 at 5:17 PM #12480on the video is the PPHILO from Fidelity
here is the condition
08/30/2016 at 7:22 PM #12490Ok thanks, I coded it. Please find attached the indicators and how it feels on PRT 10.2
Indicator also added to the Library : http://www.prorealcode.com/prorealtime-indicators/bar-count-reversals-pivot-points-highlow/
10/02/2017 at 2:01 PM #4800810/02/2017 at 3:31 PM #4801910/02/2017 at 3:42 PM #4802210/02/2017 at 4:27 PM #48029You can replace the code of the indicator with this one:
12345678910111213141516171819202122232425262728293031323334353637383940//PRC_PivotHiLo//30.08.2016//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledgep = 4period = round(p/2)+1hh = high[period]ll = low[period]countH = 0countL = 0for i = 1 to period-1 doif high[i]<hh thencountH=countH+1endifif low[i]>ll thencountL=countL+1endifnextfor i = period+1 to p+1 doif high[i]<hh thencountH=countH+1endifif low[i]>ll thencountL=countL+1endifnextif countH=p thenpivotH = high[period]endifif countL=p thenpivotL = low[period]endifdrawtext("•",barindex[period],pivotH)drawtext("•",barindex[period],pivotL)RETURN //pivotH, pivotLNow, dots begin to draw at the right bar in the past until a new highest high or lowest low is discovered.
10/02/2017 at 6:27 PM #4805210/03/2017 at 7:16 AM #4808210/03/2017 at 8:00 AM #48087Thank you.
I compre this pivotHiLo with tradingview pivot HiLo. Is possible add this formula ? ” //h1 is a pivot of h if it holds for the full length ”
” //The length defines how many periods a high or low must hold to be a “relevant pivot” ”
Tradingview code
study(title=”Pivot Points H/L”, shorttitle=”Pivots H/L”, overlay=true)
len = input(14, minval=1, title=”Length”)
//The length defines how many periods a high or low must hold to be a “relevant pivot”h = highest(len)
//The highest high over the length
h1 = dev(h, len) ? na : h
//h1 is a pivot of h if it holds for the full length
hpivot = fixnan(h1)
//creates a series which is equal to the last pivotl = lowest(len)
l1 = dev(l, len) ? na : l
lpivot = fixnan(l1)
//repeated for lowsplot(hpivot, color=blue, linewidth=2, offset= -len+1)
plot(lpivot, color=purple, linewidth=2, offset= -len+1)
//plot(h1, color=black, style=circles, linewidth=4, offset= -len+1)
//plot(l1, color=black, style=circles, linewidth=4, offset= -len+1)10/03/2017 at 8:16 AM #48088Whatever how it is calculated, highest high and lowest low should be always the same. You should have a look at these others indicators of our library to identify peaks and troughs:
https://www.prorealcode.com/prorealtime-indicators/bill-williams-fractals/
https://www.prorealcode.com/prorealtime-indicators/multi-fractals-zigzag-highlow/
https://www.prorealcode.com/prorealtime-indicators/volatility-breakout-indicator/
https://www.prorealcode.com/prorealtime-indicators/fractals-zigzag/
10/03/2017 at 8:47 AM #48093 -
AuthorPosts
Find exclusive trading pro-tools on