Retinal diseases are severe health problems that affect the quality of life. They progress slowly and asymptomatically, and thus can cause blindness, if left untreated. Therefore, the importance of early detection and follow-up treatment in the prevention of visual impairments cannot be overstated. Optical coherence tomography (OCT) is a medical imaging method for analyzing and identifying retinal layers with high resolution. In this study, we propose a computer-assisted diagnostic system with Convolutional Neural Network (CNN)-based stacking ensemble learning (EL) method to detect diabetic macular edema, drusen, and choroidal neovascularization diseases using OCT images. First, fine-tuned AlexNet (FT-CNN) was used to extract features from OCT images. The features were extracted from activation maps and then classified using homogeneous and heterogeneous EL methods. The EL methods were applied to two publicly available OCT datasets [Duke spectral domain OCT dataset and California San Diego University (UCSD) OCT dataset]. The proposed CNN-based stacking (heterogeneous) EL method classified the retinal diseases with 99.69% accuracy, 99.70% sensitivity, 99.82% specificity, 99.76% precision, and 99.73% F1 score in the Duke dataset. It classified the retinal diseases with 99.70% accuracy, 99.70% sensitivity, 99.90% specificity, 99.70% precision, and 99.70% F1 score in UCSD dataset. For the two datasets, the proposed method outperformed the state-of-the-art by earlier studies. As a consequence, it can aid physicians in the early detection of retinal illnesses and contribute to the development of computer-assisted diagnostic tools in ophthalmology.