I would like to identify divergence, but not through comparing price action with an oscillator, e.g. the MACD or other momentum oscillators (as normally done), but in its own plot. How to do this? Any existing functions which does this?

  • I’m voting to close this question because it sounds like you are asking for advice on how to use a particular program, or how to write that program, or recommendations on which one to buy. All three seem to be out of scope here. If I have misunderstood, you need to clarify the question.
    – keshlam
    Oct 30, 2022 at 19:02

1 Answer 1


Trendline comparison is a visual comparison.

An indicator for testing for divergence would be quite simple because it's a merely comparison of two lines with opposing slopes offering the result that you seek, aka convergence or divergence.

It's quite easy to determine the overall trendline for a set of data of any length. However, within that set there there will be many short term trendlines as well as some intermediate ones, of varying length and direction. It would be extremely difficult and would require some serious programming to write an algorithm that analyzes all of these possibilities.

Does one exist? Is it available out there? I have no clue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .