In 2016, cryptocurrency was reported to be active in terms of user adoption. Generally speaking, making the correct forecast is essential in any field, but it is more important in cryptocurrencies. Researchers have studied machine learning algorithms with cryptocurrencies, a concept that has been recently presented and has a great future as a financial instrument for investors. However, previous studies have ignored key variables like emotions and public opinion, which are vital in today’s market. The next contribution to this project will be a hybrid sentiment-based support vector machine (SVM) with chosen optimization methods for bitcoin predictions. Additionally, we integrate a technical indicator, the Commodity Channel Index (CCI), which is utilised in conjunction with the machine learning approach to improve the results of time series forecasting. Particle swarm optimization (PSO) and moth-flame optimization (MFO) are effective at optimising functions. This work introduces a novel hybrid sentiment-based SVM optimised by particle swarm and moth-flame algorithms (SVMPSOMFO) to improve predicting accuracy. SVMPSOMFO optimises the model’s parameter values by combining PSO and MFO, which increases search capacity and efficiency. The suggested algorithm’s performance is compared to that of three optimization algorithms, SVMPSO, SVMMFO, and SVMALO. SVMPSOMFO outperforms other algorithms based on performance and comparative study.