This script tries to find when a trading channel is developing and once is developed it will save it for later use on 2 variables up and down channel. You can access the last 2 channels for comparisons but this could be extensible for more channels.
You can choose the delta for the alignment accuracy of the channel.
The error for the difference between channels and the deviation for the width of the channel based on standard deviation.
Offset is for the alignment basically if the alignment is the same at the begining and at the offset the algo consider that a Channel.