The peak and valley functions return true one bar after the actual maximum or minimum that cause the peak or valley. This is the case because you can't know if a peak or valley exists until the completion of the following candle - by definition, a peak or valley requires three bars to identify.

If you need to plot something at the bar corresponding to the maximum or minimum, you could set the PEEK flag (this enables you to see into the future during the simulation) and check if the peak or valley functions returned true at the next bar. Somethign like this would work (but of course it won't work for live trading since you can't see into the future):

Code:
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);

}