In recent years, an increasing number of researchers have applied machine learning techniques to online portfolio selection (OLPS), aiming to improve the efficiency and effectiveness of portfolio management in the digital field. In this study, we design and implement a novel OLPS algorithm called "online adaptive asset tracking algorithm" (OAAT). Compared to the peak price tracking (PPT) algorithm, it complements more historical information of assets in the investment portfolio and provides a more effective solution for parameter selection of the PPT algorithm. Firstly, the OAAT algorithm updates investment proportions by tracking the historical information of assets, which includes recent peak prices, historical returns, and historical volatility. Secondly, the OAAT algorithm optimizes parameters through online learning. The initial parameters are selected based on the minimum sum principle of the ordinal information. After each phase of trading, the parameters are optimized through the gradient descent algorithm, and the average values of the optimal parameters in the last 5 days are used as the parameters of the next phase. Finally, with the optimized parameters and the tracked asset information, the fast error backpropagation algorithm outputs the investment ratio through gradient projection. Compared with the benchmarks, follow-the-winner, follow-the-loser, and pattern-matching-based algorithms under four Hong Kong stock index constituents data sets and three US stock index constituents data sets, the empirical comparative analysis and statistical test show that the OAAT algorithm can effectively determine the investment proportion to balance return and risk.