Moving averages (MAs) are widely used in finance by trend followers. Negative weight (corrective) moving averages negatively weight old history and attach more weight to recent history in order to achieve better fit. After analysing such methods we propose an optimal weighting scheme for smoothing stock price data. For a given smoothness level we minimise fitting error. Differently from existing methods, which have predefined weights, optimal weights are optimised for a set of stocks to achieve the best smoothness and fit ratio. Empirical evaluation of around 2000 real-world stocks from the NASDAQ and NYSE exchanges demonstrate that a novel moving average is better than other moving averages in 90% of cases. Some additional improvements can be made to improve it further, especially for longer periods. Additionally we discovered that negative weights have quite a small influence on the overall performance of moving averages. Optimised moving average weights consist of only 0% to 12% of negative weights.