Stocks & Commodities V. 24:11 (36-44): Finding point milestones from which to construct trendlines by Giorgos E. Siligardos, Ph.D.
The Pascal-like pseudolanguage here finds the points to be used as milestones from which to construct trendlines.
We consider the closing price of a trading vehicle as an array of N values: CLOSE, CLOSE, ……CLOSE[N]. Also, pivot.position, pivot.position, pivot.position and pivot.position is an array that
is used to store the time positions of the last four pivots of the SI. Finally, pivot.pivottype, pivot.pivottype, pivot.pivottype and pivot.pivottype is an array that is used to store the (+1) or (-1) assignment of the last four pivots of the SI. Expressions in bold italic in the code refer to obvious or previously stated procedures.