Custom Indicator determining how many moving averages (out of four) are very close



New member
Hey everyone, I would like input as to how I would determine how many moving averages are intersecting (or are very close to it) out of the ones I defined. To determine the proximity I'll just take the absolute value of the difference and determine a threshold I would like to meet (about 0.01). What I can't figure out is how to get the indicator to display just one integer that tells me how many of these moving averages are intersecting. If two of them are intersecting, I want the value to be one. If three are intersecting that would be 2. If two are intersecting and the other two are intersecting, but not all four, that would be a value of 2.
Could I use a switch statement to go about this or would something else be better?

Similar threads