I want to write some code that recognises 3 events which can occur in any sequence over a number of days. These are:
1 three EMA's in order, say 5>15>30 for an uptrend, and vice versa for down;
2 Cross where PDI>MDI, and;
3 ADX ramps up prior to or after point 2 above.
Most of this comes from Charles Kirkpatrick's book Investment & Trading Strategies
I don't need the code written for me, otherwise I won't learn, I just need to get the logic right. I'm assuming the code would provide recognition of 1 of the 3 conditions then 'hover' waiting for the other two to occur. It's the hovering process that has me stumped.
So could someone please point me in the right direction?