Waves script is a implementation of trend detection done by comparing current and previous candles. It has 2 rulesets for Low and Middle trends with different trend change sensitivity. It's a great tool for trend visualization but in also hame so disadvatages like lag, a delay between high or low and trend change signal, which can be a real problem in trading. All setting description was done in this video.