Swing Labels on an Average

Q: I would like to have a DYO that will assign labels to pivots on a simple moving average.  These labels would be similar to the labels used by the Pesavento Patterns (Min Size/Bars 0/0).   The DYO must be compatible with the new build for Ensign, and must include Double Tops (DT) and Double Bottoms (DB). The Pesavento Patterns do not include these.

A: Add to the chart the average study and the Pesavento Patterns study.  Change the DATA POINT selection in the Pesavento to reference the moving average and then the swing points of the average are labeled.  Use the LBL selection as the Marker on the top two rows of the Pesavento Patterns property form.