Kalyan,
I am not a TS user. But have tried it for a while.
TS do not allow to refer in future.
But there is workaround for this "software of workarounds"...
combine 3 functions... refer back, highest high & displace to get what you want, you may also have to create array.
OR just study open code, pattern recognition 'ready systems'.
OR may anybody else will be able to guide.
From what i know the actual zig-zag code can be accessed via the PowerEditor window (possibly in TS6 or higher versions), though personally i do not have any idea of TS or it's features.
The TS zig/zigzag has one important advantage in that it does not allow the right (last) leg to be formed till the percent retracement (as specified by the user) is made. This takes care of the vanishing right leg problem*, which is why i'm interested in this particular implementation. This form of the zigzag coded in Ami/MS would be a better one to use than the native implementation.
I have some idea of the algorithm, but the actual code would obviously provide better guidance and also save time.
Please see if you can access the code (whether in EL or C) in TS. And thanks for your response.
Regards,
Kalyan.
* The position of the zig pivot can still get extended & slope of the zigzag line change, however, with incoming data & as such should be deemed provisional.