How to carry out an investment portfolio efficiently and reasonably has become a hot issue. This study mainly addresses the problem of the instability of forecasting stock price investment and the difficulty in determining investment proportion by proposing the trend peak price tracing (TPPT). First of all, because of the influence of stock price anomaly, TPPT strategy sets adjustable historical window width. It uses slope value to judge prediction direction to track price change, which uses exponential moving average and peak equal weight slope value three-state price prediction method. Secondly, the accumulated wealth target is refined, and the fast error Back Propagation based on gradient projection algorithm (BP) is added. The algorithm solves investment proportion and feedbacks the increasing ability of assets to the investment proportion in order to maximize the accumulated wealth. Finally, comparison of eight empirical strategies in five typical data and statistical tests show that TPPT strategy has great advantages in balancing risk and return, and it is a robust and effective online portfolio strategy. (c) 2021 Elsevier B.V. All rights reserved.