How to find reversal points in a graph

7 次查看(过去 30 天)
Hello,
please help me find subsequent 8 reversal points in a price graph. I have indicated in the image bellow what should be specified as a reversal (highs and lows) after the initially drowned retracement levels (dashed blue lines).
Some other useful info:
Date represents one of the candles, and the rest data points are explained. Output matrix is just a matrix of 8 labeled reversal levels.
Assume that retracements levels for data sets are already computed from the same data based on specific ranges (so all the labeled levels are at prices like 2134, 2098, 2050, etc.). Also, margins for distance between the price low/high and a level will be specified manually.
P.S. I have looked into "findpeaks" function but I don't think it;s robust enough to work.
Thank you in advance!
  10 个评论
Edmundas Povilavicius
Thanks everyone for your time and for helping me out. I realized that this might be too complex and would take too long to describe and find a coding solution. I chose an alternative method - to do it manually. Thank you everyone once again.
dpb
dpb 2017-2-24
编辑:dpb 2017-2-24
Sometimes simpler is better... :) What can be essentially trivial to inspect and select by eye can be exceedingly complicated to automate; the eye/brain are quite adept at pattern recognition, zero and one "not so much" at least without quite a lot of help.
Does look an interesting problem, if there's future need to automate this, don't hesitate to post it again, but when do so, throw in some more background info and definitely do not neglect to attach real data.

请先登录,再进行评论。

回答(1 个)

Image Analyst
Image Analyst 2017-2-19
If findpeaks() is not robust enough then you can try smoothing the data before using it, like with sgolayfilt() or conv(). Or try harder to find the right parameters for findpeaks(). There are a lot of them and , granted, they're confusing. Perhaps you just haven't found the right set of input settings for it yet. Otherwise you might have to write your own code that can handle whatever rare quirky data is not correctly identified by findpeaks().
Perhaps you can include a set of data and pinpoint where in the data findpeaks() is not working correctly.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by