Finding the second maximum with conditions

Referring the following post:
Continuing the discussion from Finding first max, min and second max along the time series data:

Based on the above-mentioned discussion, I could find out the max and min values alond the time series data. But, I would like to find the second maximum value which should meeting the following condition:

  • The second max value should be on another shoulder of the maximum value (if the maximum value is on the right side of the minimum value, the second maximum should be on the left side, and vice versa)
    Could anyone help me to code for this?
    Thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.