Indicator that checks and calculate how often the pivot point is traded during the day.
The indicator calculates the pivot point as (high+low+close)/3 of the previous bar and checks if it is within the range of high/low of the current bar. If the pivot is between the high and low then the number of times trade is increased by 1. If not traded the value remains the same.
The amount of time the pivot is traded is then diveded by the number of bars loaded into the chart and returned as the percentage indicator value.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
once c1 = 0 if barindex >= 1 then pp =(high[1]+low[1]+close[1])/3 if (low < pp) and (high > pp) then c1= c1+1 else c1 = c1 endif endif return c1/barindex*100 as "Percent Pivot is traded during the day" |
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
Hej! Jag försöker lära mig att koda PRT. Jag vill testa en strategi med RSI-värde, ATR-värde, SMAs och Heikin Ashi. Jag försöker förstå hur jag ska kunna få PRT att gå lång beroende på stängd grön eller stängd röd bar. Har du några tips?
Du kan väl jämföra om open > close (röd) eller open < close (grön)