Pivot Points (High/Low), also known as Bar Count Reversals, are used to anticipate potential price reversals. Pivot Point Highs are determined by the number of bars with lower highs on either side of a Pivot Point High. Pivot Point Lows are determined by the number of bars with higher lows on either side of a Pivot Point Low.
For example, a Pivot Point High, with a period of 5, requires a minimum of 11 bars to be considered a valid Pivot Point. A minimum of 5 bars before and after the Pivot Point High all have to have lower highs.
The default period is set to 10 (p=10). It means that the whole calculation are made within 11 bars (10 bars with a pivot bar on the middle of them).
(coded by request on English forum)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
//PRC_PivotHiLo //30.08.2016 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge p = 10 period = round(p/2)+1 hh = high[period] ll = low[period] countH = 0 countL = 0 for i = 1 to period-1 do if high[i]<hh then countH=countH+1 endif if low[i]>ll then countL=countL+1 endif next for i = period+1 to p+1 do if high[i]<hh then countH=countH+1 endif if low[i]>ll then countL=countL+1 endif next if countH=p then pivotH = high[period] endif if countL=p then pivotL = low[period] endif RETURN pivotH, pivotL |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
thanks for the codewill compare that time with my code
Thanks a lot for this! That’s a valuable lesson for me.
I notice you code so many indicators Nicolas. I’m trying to learn and have fun with the platform.
Thank you for all your contributions I have found them very very useful for my learning as I don’t have a programming or mathematical background.
Muy buen indicador, lo estoy utilizando en un probacktest y es un excelente filtro para entradas.
NUEVAMENTE REPITO, ESTE ES EL MEJOR INDICADOR PARA HACER SISTEMAS DE COMPRA Y VENTA. NO ES BUENO , ! ES EXCELENTE¡, UNA VEZ ENCUENTREN LA FORMA DE UTILIZARLO LOS SISTEMAS QUE HAGAN NO BAJAN DE TENER UN PORCENTAJE DE ACIERTO DE 90 % MINIMO.
GRACIAS NICOLAS
Si has encontrado una buena manera de usar este indicador, comparte tu experiencia aquí o en un nuevo tema del foro, estaría encantado de discutir sobre ello contigo y creo que mucha otra gente también 🙂
Hi Nicolas, another really helpful bit of code, thank you! Can I ask how you might amend so that the lines on the chart are not connected, ie you just see the horizontal levels and not the vertical change ups. Conscious that you can switch the indicator view to points but I was looking for lines if possible.
Thanks vm
Good evening Nicolas, could you tell me where thae arrows on the chart come from ? I don’t see them when I install the indicator on my charts. Many thanks for advance
there is no arrow in this indicator.