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.
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"