Hi all,

I recently developed the ZigZagHighLow indicator as found here: 

https://www.investopedia.com/terms/z/zig_zag_indicator.asp

And wanted to share it with the community. All you need to do is just paste the class into your algorithm and call the constructor to initialize it. Also within the OnData(Slice) method, you need to update it with the new high and low values of the stock associated with the indicator. Below is an attached sample with all of the code you should need.

Here is a sample constructor call:

ZigZagHighLow zzhl = new ZigZagHighLow("SPY", 100, 0.1m, ATR("SPY", 10), 0.5m, history_bars);

Note that history bars is defined as a list of trading bars for loading warm up data. See sample program for how to init this.

Here is a sample update call to be included in the OnData(Slice) method:

zzhl.update(Securities["SPY"].High, Securities["SPY"].Low);

If you have any questions feel free to let me know. Enjoy!