I'd like to build an indicator to alert myself whenever there's a double top or double bottom. Problem is... I'm not sure how to do that. Visually it's very easy to see, but for a computer... not so much.
My first thought was just to scan for nearly matching tops/bottoms within a certain number of bars... but that puts far too much emphasis on getting the right bar count. So I thought "hey, maybe something w/ linear regression" ... but at that point I'm out of my depth.
My search here didn't turn up much. So I figured I'd ask the group. Anyone got any ideas on how something like that would be coded? I don't need specific code, just some possible avenues to research.
My first thought was just to scan for nearly matching tops/bottoms within a certain number of bars... but that puts far too much emphasis on getting the right bar count. So I thought "hey, maybe something w/ linear regression" ... but at that point I'm out of my depth.
My search here didn't turn up much. So I figured I'd ask the group. Anyone got any ideas on how something like that would be coded? I don't need specific code, just some possible avenues to research.