1. A method for predicting the condition of a machine or a component of the machine based on measurements of a condition monitoring parameter, wherein a potential failure level of the condition monitoring parameter has been defined, at which level damage of the machine or component is considered initiated, wherein a pattern for the condition monitoring parameter has been defined, which pattern reflects an expected behavior of the monitoring parameter after damage has been initiated, and a plurality of measurement values of the condition monitoring parameter have been stored in a moving window, and the method comprises the steps of: a) obtaining a new measurement value of the condition monitoring parameter, b) comparing the new measurement value with the latest stored measurement value, and discard the new measurement value if it is smaller than the latest stored measurement value, and otherwise replace the oldest of the measurement values stored in the moving window with the new measurement value, c) comparing the new measurement value with the potential failure level of the condition monitoring parameter, and repeating the steps a-c until the new measurement value exceeds the potential failure level of the condition monitoring parameter, d) determining the point in time when the monitoring parameter exceeded the potential failure level, e) receiving a new measurement value of the condition monitoring parameter, f) comparing the new measurement value with the latest stored measurement value, and discarded the new measurement value if it is smaller than the latest stored measurement value, g) comparing the new measurement value with an expected value determined in accordance with said defined pattern for the condition monitoring parameter and the time elapsed since the point in time the monitoring parameter exceeded the potential failure level, and discard the new measurement value if it deviates too much from the pattern, and otherwise replace the oldest of the measurement values stored in the moving window with the new measurement value, and h) predicting the level of the condition monitoring parameter at a future point in time based on the measurement values stored in the moving window.