get_channel: select trend duration based on mode
builtin_plots: minor bug fix