1) Any given quote must be defined with a PointType. These are High, Low, Both or None.
1.a) A High point is a point for which the previous and post quotes are lower, Low is the opposite, both means both criteria fit (it happens).
2) Later I define a support or resistance line as a quote with a value, starting date, and a tolerance percentage. This means That the next quotes do not necessarily need to "touch" the exact value.
2.a) Every High or Low point is a potencial support or resistance line.
2.b) I define an algorithm to test if if each subsequent quote either, touches, is on the correct side, or is on the wrong side of the line. If it is on the wrong side of the line then the support, or resistance is broken.
2.c) With a "Touch" the line is confirmed.
3.a) One break is allowed and this transforms the line in the opposite (support to resistance and the other way around)
3.b) After the second brake means the line is invalid and I define that date as the ending date for that line.
how many lines will you have depends on the size of your tolerance level, I found out that a value of +-20% works well.
Hope it helps!
The following user says Thank You to marianobilli for this post:
I saw your posts on this subject and wondered what progress you have made in this area since these posts are from 2011 to 2014. I am looking to automate this process in either c#, Python or some other tradeable method.
do you think one main factor on these levels might be the $volume of options these market makers have sold at those levels and they need to defend them so that as many as possible of these options are going to expire worthless.