Yes this should be possible.You could do something like this: conversionPeriod1 = input.int(9, minval=1, title="Conversion Line Length 1") conversionPeriod2 = input.int(18, minval=1, title="Conversion Line Length 2") donchian(len1,len2) => math.avg(ta.lowest(len2), ta.highest(len1) conversionLine = ...