function run()
{
set(PLOTNOW|PEEK);
int ma_short = 5;
BarPeriod = 60*8;
vars Price = series(price());
vars lowpass_MA_short = series(LowPass(Price, ma_short));
//future peeking lowpass filter
vars PricePeek = series(price(-1));
vars lowpassPeek = series(LowPass(PricePeek, ma_short));
if (valley(lowpassPeek)) {
plot("valley", priceLow()-10*PIP, DOT, YELLOW);
}
else if (peak(lowpassPeek)) {
plot("peak", priceHigh()+10*PIP, DOT, GREEN );
}
PlotBars = 100;
PlotScale = 12;
plot("lowpass", lowpass_MA_short, MAIN, BLUE);
}