The foreign exchange market is one of the complex monetary markets in the world. Each day trillions of dollars are traded in the FOREX market by banks, retail traders, corporations, and individuals. It is very challenging to predict the price in advance due to the complex, volatile and high fluctuation. Investors and traders are constantly searching for innovative ways to outperform the market and increase their profits. As an outcome, forecasting models are continually being developed by scholars around the globe to accurately predict the characteristics of this nascent market. This study intends to apply the Random Forest (RF) approach to Convolutional Neural Networks, which involves two key steps. The first step is starting with feature selection using Convolutional neural network.The attention layer is then employed to assign weight.The random forest strategy is designed in the second stage to generate high-quality feature subsets. Thus the better result generated by CNN-RF model. Actually, this strategy combines the advantages of two different strategies to produce an outcome that is more consistent with what exchange market decision-makers anticipate happening in the exchange market.The main currency pairs considered in this study's proposed model for predicting exchange rates five and ten minutes in advance are the British Pound Sterling (GBP) against the US Dollar (USD), the Australian Dollar (AUD) against the US Dollar (USD), and the European Euro (EUR) against the Canadian Dollar (CAD) are also used to evaluate the performance of the proposed model. In compared to the other three models (Multi-Layer Perceptron, Autoregressive Integrated Moving Average, and Recurrent Neural Network), CNN-RF yields better results. This conclusion has been backed by a large body of empirical research, which also suggested that this methodology be regularly used due to its high efficacy.