djoffrey / HarmonicPatterns

A library written in Python to search harmonic patterns automatically.
MIT License
117 stars 64 forks source link

Avoid multiple highs or lows in a row #1

Closed kfreskgard closed 2 years ago

kfreskgard commented 2 years ago

If you have the same candle, setting new high and low, twice in a row changed or direction will not by updated resulting in an extra pat in the same direction. Final zigzag would be something like HLLHL, causing a division by zero later on.

djoffrey commented 2 years ago

No, the changed variable is changed after a new high or new low is found, so there will not be HH or LL