I am looking for help creating a CountIf Function for PRT. Essentially something I can pass a Boolean condition and integer value and then check how many times the Boolean condition was true in the last integer value bars. For example,
CountIf ( Close[0] <= Close[1] , 10 ) // this ideally would return the number of times the close was below or equal to the previous low in the previous 10 bars. Possible values would be 0 to 10 with 0 being 0 occurrences and 10 being all 10 bars it was true.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue