A hydraulic system for an installation for heating and generating domestic hot water, which heating installation comprises a primary heat exchanger for heating a water flow usable in a heating hydraulic circuit (22, 24), a secondary heat exchanger for transferring heat from a water flow coming from the primary heat exchanger to a domestic water flow and a circulation pump for generating the water flow in the primary heat exchanger; the hydraulic system comprising a three-way valve, said three-way valve comprising a first port for connection to the primary heat exchanger, a second port and a third port for connection to the heating circuit (22, 24) and to the secondary heat exchanger, respectively; wherein said three-way valve is switchable between at least two positions in which the first port is selectively in fluid communication with the second port or with the third port; wherein said three-way valve comprises a movable support and an obstructing member carried by said movable support, at least one of which is responsive to pressure applied by the circulation pump at the first port, at least one of said movable support and obstructing member being movable due to transitions between an off-state and an on-state of the circulation pump; wherein the hydraulic system is characterized in that the three-way valve further comprises return means (85b, 85c) associated with the movable support and producing an elastic force to bias the movable support towards an intermediate position between the opposed seats (81d, 81e) of the three-way valve, wherein said intermediate position is associated with the off-state of the circulation pump; wherein the obstructing member comprises a pair of sealing surfaces (83b, 83c) facing away from each other and adapted to engage reciprocatingly respective opposed seats (81d, 81e) of the three-way valve interposed between the first port and the second port, and between the first port and the third port, respectively; wherein, when the obstructing member is engaged against one of said opposed seats (81d, 81e) of the three-way valve, hereinafter engaged seat, said movable support is movable towards said engaged seat, against the action of said elastic force, due to pressure when the circulation pump switches from the off-state to the on-state; and wherein said movable support is capable of driving the obstructing member from said engaged seat to the other of said opposed seats (81d, 81e) of the three-way valve due to said elastic force when the circulation pump switches from the on-state to the off-state, and the movable support is slidably arranged between the opposed seats (81d, 81e) of the three-way valve and the obstructing member is formed as a flexible conical ring arranged around the movable support. the hydraulic system comprising a three-way valve, said three-way valve comprising a first port for connection to the primary heat exchanger, a second port and a third port for connection to the heating circuit (22, 24) and to the secondary heat exchanger, respectively; wherein said three-way valve is switchable between at least two positions in which the first port is selectively in fluid communication with the second port or with the third port; wherein said three-way valve comprises a movable support and an obstructing member carried by said movable support, at least one of which is responsive to pressure applied by the circulation pump at the first port, at least one of said movable support and obstructing member being movable due to transitions between an off-state and an on-state of the circulation pump; wherein the hydraulic system is characterized in that the three-way valve further comprises return means (85b, 85c) associated with the movable support and producing an elastic force to bias the movable support towards an intermediate position between the opposed seats (81d, 81e) of the three-way valve, wherein said intermediate position is associated with the off-state of the circulation pump; wherein the obstructing member comprises a pair of sealing surfaces (83b, 83c) facing away from each other and adapted to engage reciprocatingly respective opposed seats (81d, 81e) of the three-way valve interposed between the first port and the second port, and between the first port and the third port, respectively; wherein, when the obstructing member is engaged against one of said opposed seats (81d, 81e) of the three-way valve, hereinafter engaged seat, said movable support is movable towards said engaged seat, against the action of said elastic force, due to pressure when the circulation pump switches from the off-state to the on-state; and wherein said movable support is capable of driving the obstructing member from said engaged seat to the other of said opposed seats (81d, 81e) of the three-way valve due to said elastic force when the circulation pump switches from the on-state to the off-state, and the movable support is slidably arranged between the opposed seats (81d, 81e) of the three-way valve and the obstructing member is formed as a flexible conical ring arranged around the movable support.