The trends of rising energy consumption, growing concerns about the environment and the climate change as well as the increasing scarcity of fossil fuels put a high pressure on the energy sector of today. The most promising solution to face these issues is the introduction of renewable energy sources on distribution level. However, since the generation output of renewable energy sources is very volatile, new energy management concepts are required that enhance the integration of renewables and simultaneously reduce the amount of electricity required from external grids. In order to address this topic, a market-based multi-agent system is developed and implemented that pursues the goal to manage the energy supply and demand of a distributed energy system. The focus is put on the coordination of electro-thermal heating devices, such as CHP units or HPs, that are installed in each house combined with a thermal buffer storage. To enable the interaction of the houses a local electricity market is established, on which the participants are able to trade electricity. The variable market price serves as incentive to shift production and consumption of the heating devices. In a second step, the idea of price anticipation is presented. Price anticipation gives house agents the chance to react to expected price changes in the near future and therefore increase their economical benefit.