This paper presents a day ahead optimal dispatch method for smart grids including two-axis tracking photovoltaic (PV) panels, wind turbines (WT), a battery energy storage system (BESS) and electric vehicles (EV), which serve as additional storage systems in vehicle to grid (V2G) mode. The aim of the day ahead schedule is the minimization of fuel-based energy, imported from the main grid. The feasibility of the proposed method lies on the extensive communication network of the smart grids, including sensors and metering devices, that provide valuable information regarding the production of the distributed energy resources (DER), the energy consumption and the behavior of EV users. The day ahead optimal dispatch method is applied on a smart grid in order to showcase its effectiveness in terms of sustainability, full exploitation of DER production and ability of EVs to act as prosumers.