Weighing-in-motion (WIM) systems automatically perform the dynamic weighing of railway vehicles while the trains are running on the lines through a reasonable number of measurement points placed along the track. Such intelligent systems may overcome disadvantages in terms of costs and traffic management, which are typical of conventional static weighing systems. In this paper, we present an innovative algorithm for dynamical WIM applications aimed at estimating the axle and wheel loads of a generic train composition by means of indirect track measurements. The new approach allows the axle loads estimation at high vehicle speeds and can be customized for several input track measurements (rail shear, rail bending, vertical forces on the sleepers, etc.) as well as a combination of them. Consequently, it can be employed in different kinds of measurement stations. Having once studied the accuracy of the algorithm in estimating the loads, the same novel procedure is used to estimate the center-of-gravity position of the railway vehicle to avoid dangerous imbalances. The algorithm can receive as inputs both experimental and simulated data; simulated data are fundamental to test the algorithm (in terms of accuracy and robustness) under any operating conditions when experimental data are not available. A wide simulation campaign has been carried out to test the algorithm performances, obtaining promising results. In the near future, the proposed approach will be validated through suitable data coming from experimental tests organized in collaboration with Ansaldo STS and ECM SpA, which are the industrial partners of this research project.