The stock market is always considered a highly potential investment channel for the public. However, unpredictable fluctuations often require investors to continuously monitor and analyze the market with a huge amount of data. This research was conducted to implement machine learning methods in automated stock trading based on indicators, aiding investors in evaluating the effectiveness of trading strategies based on these indicators and suggesting the most appropriate investment portfolios, thus minimizing the time and effort spent on data processing. Specifically, the application process we developed and implemented involves four steps: (i) data collection, (ii) automated trading based on indicators (SMA, Bollinger Bands, RSI, MACD), (iii) building an optimal investment portfolio based on automated trading results using the Sharpe ratio method, and (iv) testing and evaluating the trading results with new data. Using data collected from VN30 stocks, the study results demonstrate that trading based on indicators and proposing an optimal investment portfolio yields high-profit rates and minimizes investor risks.