SwingLength Ninjatrader 7 to convert to Ninjatrader 8

https://ninjatraderecosystem.com/user-app-share-download/swinglength/?wpdmdl=15162&refresh=687810d8cca581752699096

Hi,
Can someone please convert this swinglenth code from Ninjatrader 7 to Ninjatrader 8

Thanks