In the world of automated stock trading, Deep Reinforcement Learning (DRL) techniques have become highly effective due to their inherent capability of learning optimal trading strategies through trial and error. However, a single DRL agent lacks the flexibility to adapt to the complex and evolving market dynamics, yielding a suboptimal strategy. This paper proposes a Bayesian optimization-based dynamic ensemble approach utilizing various model-free DRL algorithms for multi-stock trading. The ensemble method enhances decision-making by leveraging the policies of diverse models while mitigating the risk of overfitting. The proposed model uses recent historical data to compute dynamic time-varying weights for the ensemble and employs Bayesian optimization for hyperparameter tuning. The effectiveness of our proposed approach is assessed using two global stock market indices: Dow Jones from the U.S. and Sensex from India. The empirical results demonstrate that the proposed methodology outperformed the market indices and several other benchmark trading strategies, taking into consideration the risk and return measures. Our ensemble approach demonstrated the ability to achieve higher profits with reduced risks and rapid recovery after corrections.