A lattice algorithm for pricing moving average barrier options