study(title="TSP Retracement 90", shorttitle="TSP Retracement 90", overlay=true) basePeriods = input(90, minval=1, title="Retracement 90") donchian(len) => avg(lowest(len), highest(len)) baseLine = donchian(basePeriods) plot(baseLine, color=#991515, title="Base Line")