The connection of generation units at the distribution level is expected to increase significantly in the future. This phenomenon will have impacts on the planning and operation of the electric system, both at the local (e.g. appearance of reverse power flows) and global (e.g. modification of the supply-demand equilibrium and of the reserve provisioning capabilities) level. In this context, storage devices are increasingly seen as a possible way to mitigate these impacts, with the caveat-compared to alternative solutions-that their versatility comes with high investment costs. Consequently, it is of the utmost importance to make sure that the full capabilities of these storage devices are put to use. Following this line of thought, this paper presents an algorithm suitable for planning purposes that simulates the yearly operation of distributed energy storage units connected at the medium voltage level to maximize the profit drawn from market operation while respecting voltage and reserve requirement constraints.