Hi! How to make this indicator show lines from the daily chart to the 1 minute chart ? I added 2 lines as written here
https://usethinkscript.com/threads/converting-indicator-to-multi-timeframe-mtf-in-thinkorswim.8050/,
but it doesn't work-((
input agg = AggregationPeriod.dAY ;
def close = close(period = agg);
input price = close;
input cutoffLength = 10;
assert(cutoffLength > 0, "cutoffLength must be positive: " + cutoffLength);
def a1 = Exp(-Double.Pi * Sqrt(2) / cutoffLength);
def coeff2 = 2 * a1 * Cos(Sqrt(2) * Double.Pi / cutoffLength);
def coeff3 = - Sqr(a1);
def coeff1 = 1 - coeff2 - coeff3;
def filt = if IsNaN(price + price[1]) then filt[1] else coeff1 * (price + price[1]) / 2 + coeff2 * filt[1] + coeff3 * filt[2];
plot SuperSmootherFilter = if !IsNaN(price) then filt else Double.NaN;
SuperSmootherFilter.SetDefaultColor(GetColor(5));
https://usethinkscript.com/threads/converting-indicator-to-multi-timeframe-mtf-in-thinkorswim.8050/,
but it doesn't work-((
input agg = AggregationPeriod.dAY ;
def close = close(period = agg);
input price = close;
input cutoffLength = 10;
assert(cutoffLength > 0, "cutoffLength must be positive: " + cutoffLength);
def a1 = Exp(-Double.Pi * Sqrt(2) / cutoffLength);
def coeff2 = 2 * a1 * Cos(Sqrt(2) * Double.Pi / cutoffLength);
def coeff3 = - Sqr(a1);
def coeff1 = 1 - coeff2 - coeff3;
def filt = if IsNaN(price + price[1]) then filt[1] else coeff1 * (price + price[1]) / 2 + coeff2 * filt[1] + coeff3 * filt[2];
plot SuperSmootherFilter = if !IsNaN(price) then filt else Double.NaN;
SuperSmootherFilter.SetDefaultColor(GetColor(5));