High/low detection in candlestick price chart

3.6k Views Asked by At

I am looking for an algorithm for detecting swing highs and lows from a candlestick price chart with as little lagging as possible. What's observed as a high/low is slightly subjective, but the following figure gives an example (the green bow indicates that the whole set of candles could be seen as a single swing):

enter image description here

I implemented two solutions so far:

  1. Detection based on candlestick patterns where a swing is formed by three candles (low - high - low for a top swing). This has little lag but produces many swings.
  2. Detection of slope sign change from moving average (Hull Moving Average). This generates good swings but with considerable lag and many swings (especially ones close to each other) are omitted.

How can I detect swings with higher accuracy?

Regards,

0

There are 0 best solutions below