4 Hr Pivot on Intraday Timeframe
Forums › ProRealTime English forum › ProBuilder support › 4 Hr Pivot on Intraday Timeframe
- This topic has 5 replies, 3 voices, and was last updated 2 years ago by druby.
-
-
06/29/2022 at 7:05 AM #19635106/29/2022 at 10:28 AM #19636206/29/2022 at 11:40 AM #196366
There you go:
123456789101112131415161718192021222324252627// Pivot H4 intraday//Timeframe(4h,UpdateOnClose)//// Pivot H4//Pivot = (high + low + close)/3//Res1 = 2*((high + low + close)/3) - lowRes2 = (high + low + close)/3+(high-low)Res3 = high+2*((high + low + close)/3-low)//Sup1 = 2*((high + low + close)/3) - highSup2 = (high + low + close)/3-(high-low)Sup3 = high+2*(((high + low + close)/3)-low)//MidR1 = (3*((high + low + close)/3)-low)/2MidR2 = 3*(((high + low + close)/3)+high)/2-lowMidR3 = high+3*(((high + low + close)/3)-low)/2//MidS1 = (3*((high + low + close)/3)-high)/2MidS2 = 3*(((high + low + close)/3)-low)/2-highMidS3 = low+3*(((high + low + close)/3)-high)/2//Timeframe(default)//RETURN Pivot AS "Pivot H4",Res1 AS "Res1 H4",Res2 AS "Res2 H4",Res2 AS "Res3 H4",Sup1 AS "Sup1 H4",Sup2 AS "Sup2 H4",Sup3 AS "Sup3 H4",MidR1 AS "MidR1 H4",MidR2 AS "MidR2 H4",MidR3 AS "MidR3 H4",MidS1 AS "MidS1 H4",MidS2 AS "MidS2 H4",MidS3 AS "MidS3 H4"1 user thanked author for this post.
06/29/2022 at 3:20 PM #19638306/29/2022 at 4:27 PM #196393I will like to put labels on the chart
I realise that i cant add the label because of the update on close statement
I am using
drawtext(“Res1”,barindex,Res1+Voffset,SansSerif,Bold,15)
drawtext(“Res2”,barindex,Res2+Voffset,SansSerif,Bold,15)
drawtext(“Res3”,barindex,Res3+Voffset,SansSerif,Bold,15) andDRAWSEGMENT(barindex, Res1, barindex+10, Res1)
DRAWSEGMENT(barindex, Res2, barindex+10, Res2)
DRAWSEGMENT(barindex, Res3, barindex+10, Res3)Is there a workaround?
Thanks
06/29/2022 at 8:51 PM #196405Hi, the code additions put fixed text labels at the current bar location. Also while checking I came across a few gremlins which I think I’ve corrected on original lines 15,18,22 and 27.
I’m curious, why your not using the stock pivot point indicator set to 4 hours.
Text modification and corrections12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849// Pivot H4 intraday//Timeframe(4h,UpdateOnClose)//// Pivot H4//Pivot = (high + low + close)/3//Res1 = 2*((high + low + close)/3) - lowRes2 = (high + low + close)/3+(high-low)Res3 = high+2*((high + low + close)/3-low)//Sup1 = 2*((high + low + close)/3) - highSup2 = (high + low + close)/3-(high-low)Sup3 = low+2*(((high + low + close)/3)-high)//MidR1 = (3*((high + low + close)/3)-low)/2MidR2 = (3*((high + low + close)/3)+high)/2-lowMidR3 = high+3*(((high + low + close)/3)-low)/2//MidS1 = (3*((high + low + close)/3)-high)/2MidS2 = (3*((high + low + close)/3)+low)/2-highMidS3 = low+3*(((high + low + close)/3)-high)/2//Timeframe(default)if isLastBarUpdate thenDrawtext(" Piv H4",-20,Pivot+2) Anchor(topRight,xShift,value) Coloured(0,0,0,255)Drawtext(" R1 H4",-20,Res1+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext(" R2 H4",-20,Res2+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext(" R3 H4",-20,Res3+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext(" S1 H4",-20,Sup1+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)Drawtext(" S2 H4",-20,Sup2+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)Drawtext(" S3 H4",-20,Sup3+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)Drawtext("mR1 H4",-20,MidR1+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext("mR2 H4",-20,MidR2+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext("mR3 H4",-20,MidR3+2) Anchor(topRight,xShift,value) Coloured(255,0,0,255)Drawtext("mS1 H4",-20,MidS1+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)Drawtext("mS2 H4",-20,MidS2+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)Drawtext("mS3 H4",-20,MidS3+2) Anchor(topRight,xShift,value) Coloured(0,128,0,255)endif//RETURN Pivot AS "Pivot H4",Res1 AS "Res1 H4",Res2 AS "Res2 H4",Res3 AS "Res3 H4",Sup1 AS "Sup1 H4",Sup2 AS "Sup2 H4",Sup3 AS "Sup3 H4",MidR1 AS "MidR1 H4",MidR2 AS "MidR2 H4",MidR3 AS "MidR3 H4",MidS1 AS "MidS1 H4",MidS2 AS "MidS2 H4",MidS3 AS "MidS3 H4"2 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on