I'm brainstorming and would value your input. Currently, I'm trying to design an algo that would recognize a specific condition to determine when to buys/sells a stock, regarding what the MACD histogram is doing. (of course there are many ways to interpret the MACD, I'm just having trouble getting the code to replicate the conditions below):
For example:
-if the histogram reaches a certain height (similar to the past peaks)
-if the histogram remains at a certain height (for a certain period)
-if the slope of the histogram is x amount over a range of say T minutes.
Im not even entirely sure what unit the Y-axis of the MACD histogram is in.
But, ideally I'm looking for some idea to develop the building blocks for a formula to recognize the above conditions.
Side note: Im sure the sort of slope or height analysis could be used on many other technical indicators, which is where i plan to venture onto afterwards.
Anyways, any help at all would be much appreciated!
Mike