Customise (or re-write) an existing meta-stock chartist indicator; script available.
Existing script is less than 20 lines.
the existing indicator is the ZigZag indicator.
The change is to create a High to Low to High ZigZag. Existing version needs debugging or rewriting and testing. in tests I have identified data points where this indicator does not follow the rules based charting instructions.