TW Draconis is one of the most well known Algol-type eclipsing binaries. There is significant evidence for miscellaneous interacting physical processes in the system, which manifest themselves as for example period and light curve changes. We study time series data for the star accumulated over the past 150 years to detect changes in minima timings. Using 561 available minima timings, we compile an extended O-C diagram analysis. A detailed description of period changes allows us to construct the true phased light curve at any moment. By applying weighting nonlinear robust regression the timing residuals were analysed. The weights of individual types of minima were determined iteratively. The ephemeris are expressed in the orthogonal or quasi-orthogonal forms allowing us for example to determine directly uncertainties of photometric phases for any given moments. The timing residuals (according to the linear ephemeris) display two stages of differing behaviour in 1858-2007. The first part ends around 1942. It is characterised by more or less smooth linear/parabolic course of timing residuals. In 1858-1905, the period was almost constant P=2.806513(9)d, but, in 1905-1942, the period increased with the rate of 5.69(5)x10–8d/year. We interpret this as a result of continuous mass exchange between components at the mean rate of 6.9x10–7M☉/year. Since 1942, the system has been showing alternating and shortening period changes with the length of a cycle of about two decades, modulated by short-term periodic variations. The latter small variations with the period 6.5 years are caused by the light-time effect due to the presence of a third low-mass body in the system. Major oscillations can be explained as consequences of quadrupole moment variation in the system.