This is another among zillions of attempts at a moving average of a security. More precisely, two attempts at one go). The zzoid function generates a zigzag-like MA that can adopt different forms. The stepline function creates, sure enough, a stepline.