Age-related macular degeneration (AMD) is the leading cause of blindness in developed countries. Subretinal fluid (SRF) and sub-retinal pigment epithelium (sub-RPE) fluid are signs of AMD and can be detected in optical coherence tomography images. However, manual detection and segmentation of SRFs and sub-RPE fluids are laborious and time consuming. In this paper, a novel pipeline is proposed for automatic detection of SRFs and sub-RPE fluids. First, top and bottom layers of retina are segmented using a graph cut method. Then, a Split Bregman-based segmentation method is used to segment dark regions between layers. These segmented regions are considered as potential fluid candidates, on which a set of features are generated. After that, a random forest classifier is trained to distinguish between the true fluid regions from the falsely detected fluid regions. This method shows reasonable performance in a leave-one-out evaluation using a dataset from 21 patients.