Count and CountInclusive |
Top Previous Next |
Example chart for this topic: CountInclusive and CountSinceInclusive.cht Count(condition1, condition2, condition series, reset flag) Parameters: CountInclusive(condition1, condition2, condition series, reset flag) Same as Count except that the bars on which conditions 1 and 2 occur are included in the count if they are true. Counts how many times the condition series is a non-zero value (true) between the last occurrence of condition2 and the immediately preceding occurrence of condition1, exclusive of the bars on which conditions 1 and 2 occur. Reset Flag Reset flag = 1 (default) The Count indicator calculates on the same bar when condition2 takes place after an occurrence of condition1. The Count indicator recalculates at all repeating occurrences of condition2. The indicator output is a horizontal line that begins on the same bar where condition2 occurs (exclusive of that bar) and continues up until the next bar where condition2 occurs in the next condition1/condition2 pair (exclusive of that bar). If the reset flag is set to 1, it effectively tells the indicator to “forget” about the condition1 value before the occurrence of the first condition2, and so on. Reset flag = 0 The Count indicator calculates once on the same bar when the first occurrence of condition2 is found after an occurrence of condition1. The Count indicator does not recalculate if condition2 repeats. Note: The Count and CountInclusive indicators use close as a default parameter value when a condition is required. Close is a non-zero value so it is always a true condition. However, you should not pay attention to these indicator results until you change the close to a condition that may be either true or false. |