# Combination of BollingerBands BandpassFilter midline polt with ExpMA of one minute and 2 minutes. Only use on 1 minute chart.
# Horserider coded from request by Gimmickface
# BollingerBands band midline plot
input pricebb = close;
input displacebb = 0;
input lengthbb = 20;
input averageTypebb = AverageType.SIMPLE;
plot MidLine = MovingAverage(averageTypebb, data = pricebb[-displacebb], length = lengthbb);
MidLine.SetDefaultColor(GetColor(7));
# Chart period ExpMA Inertia this case 1 minute
input price = close;
input length = 5;
input displace = 0;
plot SMA = movAvgExponential( price[-displace], length);
SMA.SetDefaultColor(GetColor(1));
SMA.SetPaintingStrategy(PaintingStrategy.LINE);
# 2 Minute ExpMA
input price2 = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.TWO_MIN;
input length2 = 5;
input displace2 = 0;
input showOnlyLastPeriod = no;
plot DailySMA;
if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) {
DailySMA = Double.NaN;
} else {
DailySMA = movAvgExponential(fundamental(price2, period = aggregationPeriod)[-displace2], length2);
}
DailySMA.SetDefaultColor(GetColor(2));
DailySMA.SetPaintingStrategy(PaintingStrategy.LINE);