i am trying to code an indicator which detects and plots harmonic patterns.
after first thinking about using zigzag to detect swing high and lows, i finally decided to use the swing indicator which seem to be much better for this purpose.
as harmonic patterns are built from different swing points which are related to each other using fibonacci ratios i now need to find a way how i could go through those swing points and check for valid patterns.
in the attached indicator i started with the bearish bat but quickly realised that if i want to detect 20 different patterns, this will consume a lot of cpu each time the pattern detection is executed.
does anybody of you have maybe coded something similar or has a good idea how i could work through the data with less computing effort?
thank you and cheers,
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).