Custom PCF % True Indicator

The custom PCF % true indicator allows you to create an indicator that returns a value between 0 and 100 for the number of times a boolean (True/false) formula returned true over a specified number of bars

To add a custom PCF % true indicator to your chart click the add plot button

You can also press the forward slash "/" key to open the add plot menu

Select Custom PCF % true Indicator from the list of available indicators

This will plot the indicator on your chart and open the editor for that indicator

By default the boolean formula used is Close "C" is greater than the previous Close "C1" and the period is set to 1. This means that the indicator can only return a value of 0 (Not true) or 100 (True). Let's change the period to 10 then click OK to apply the changes

You can now see there are multiple values returned indicating the number of times over a rolling 10 bar period the boolean condition C>C1 returned true

The value of 50 means that out of the latest 10 bars C>C1 returned true 5 times, the value of 60 means that at that point in time 6 of the last 10 bars returned true. For more information on creating PCF indicators please visit our PCF help index