Energy storage systems, along with many capabilities in the grid, are costly technologies. Therefore, their economic issues should be also considered while they are used in the grid. In this paper, a method has been proposed that can be used to determine the location, power, and capacity of the energy storage systems with consideration of the technical and economic aspects, simultaneously. Technical goals of this method are improvement of voltage profile and loss reduction, while economic objectives are including reduction of investment cost, operation and maintenance cost of the energy storage system. The problem of optimization is solved with the symbiotic organisms search algorithm. The main advantage of this algorithm is the absence of specific regulatory parameters compared to other meta-heuristic algorithms. The proposed plan has been implemented safely. Safe performance is achieved by enforcing security constraints such as voltage and power balancing and constraints for the energy storage system, such as capacity of energy and power constraints, and amount of energy stored. The distributed generation used in this plan is wind power plant. The output of each turbine is determined by a linear model reliant on wind speed. The proposed method has been implemented on the IEEE 33 bus grid. The results demonstrate the efficiency and capability of the proposed method.