Basic price pattern detection
|SYNTAX||TroughBars(ARRAY, change, n = 1)|
|FUNCTION||Plots the number of bars that have passed from the n-th trough. This uses the Zig Zag function (see Zig Zag) to determine the troughs. Caveat: this function is based on Zig-Zag indicator and may look into the future.|
The TroughBars function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.