Combining Multizigzag with harmonic patterns - this script generates harmonic patterns based on multiple deapth zigzags.
Input parameter allows to chose which Zigzag to be included in pattern identification and set different length, line color, width and style for each Zigzag combinations.
Fixed minor calculation error with respect to zigzag
Notes de version
⋅
Added ABCD patterns and Double Top/Bottom patterns to this script. With multiple zigzags running, display can become messy. Disable the ones you don't use in your input parameters.
Notes de version
⋅
Fix zigzag logical error
Notes de version
⋅
Removed not so important line width and line style parameters.
Hi, I really love this code. I saw many potential of this code using array, there are more code can be converted into array. Keep up the goo
Trendoscope
⋅
@RozaniGhani-RG, thanks very much for your support. Yeah I agree how powerful arrays are. What I am missing though is array of independent structure. If pine can provide that it will make things much simpler.
KevInnerTrading
⋅
@HeWhoMustNotBeNamed, I really love your code, thanks so much! Really wonderful! Btw, what is an "array of independent structure", do you have an example in another language to understand what Pine Script doesn't currently support?
Trendoscope
⋅
@OnlyLogicNoEmotions, Structure is group of elements which you can probably see in many programming languages. For example, If we consider Harmonic Pattern as one Object, we should be able to define it something like this:
If we can create data structure like this,
Every time we detect a pattern, we can create this object and push into an array as whole.
Makes implementation much easier. At this point, I have been using different arrays for each of the items within
KevInnerTrading
⋅
@HeWhoMustNotBeNamed, Ok I see so you need C like struct functionality. Do you have an idea why they don't add it? Struct are significantly less heavy than full Object/Class plus they could place limits on them. You only need very small structs anyways and it would clean up your code quite lot. Do think it is a computation/memory thing or another reason?
Also, random question what do you think is more computationally heavy allowing struct or multi-dimensional arrays?
Trendoscope
⋅
@OnlyLogicNoEmotions, Yeah. I am more of object oriented programmer. But, I do love the liberty of interpreted scripts. Not sure of complexity involved. We are waiting for pine version 5 release. Expect huge improvements soon.