A heave compensator, comprising: - a main hydraulic cylinder comprising a first connection device located at an upper end of the main hydraulic cylinder and a first piston having a piston rod, where the interior of the main hydraulic cylinder is divided by the first piston into an upper first chamber and a lower second chamber filled with hydraulic liquid, and where the piston rod has a second connection device located at a lower end of the piston rod, - a lifting accumulator comprising a second piston dividing the interior of the lifting accumulator into a third chamber filled with gas and a fourth chamber filled with hydraulic liquid, wherein the fourth chamber is fluidly connected to the second chamber by a first liquid conduit having a first actuator controlled valve regulating the flow of hydraulic liquid in the first liquid conduit, - a lowering accumulator comprising a third piston dividing the interior of the lowering accumulator into a fifth chamber filled with gas and a sixth chamber filled with hydraulic liquid, wherein the sixth chamber is fluidly connected to the second chamber by a second liquid conduit having a second actuator controlled valve regulating the flow of hydraulic liquid in the second liquid conduit, wherein - the sixth chamber is fluidly connected to the fourth chamber by a third hydraulic liquid conduit comprising an actuator controlled pump unidirectionally regulating the flow of hydraulic liquid from the sixth chamber to the fourth chamber, and in that the heave compensator further comprises: - a sensor kit comprising a motion sensing unit registering the vertical movements of the main hydraulic cylinder, - a logical controller unit comprising a processor loaded with a Valve Regulation Module containing logic commands which when executed controls and regulates the actuator of the first actuator controlled valve, the actuator of the second actuator controlled valve, and the actuator of the actuator controlled pump, and - signal transferring lines electronically connecting the logic controller unit to the motion sensing unit of the sensor kit, the actuators of the first and the second actuator controlled valves, and the actuator of the actuator controlled pump. - a main hydraulic cylinder comprising a first connection device located at an upper end of the main hydraulic cylinder and a first piston having a piston rod, where the interior of the main hydraulic cylinder is divided by the first piston into an upper first chamber and a lower second chamber filled with hydraulic liquid, and where the piston rod has a second connection device located at a lower end of the piston rod, - a lifting accumulator comprising a second piston dividing the interior of the lifting accumulator into a third chamber filled with gas and a fourth chamber filled with hydraulic liquid, wherein the fourth chamber is fluidly connected to the second chamber by a first liquid conduit having a first actuator controlled valve regulating the flow of hydraulic liquid in the first liquid conduit, - a lowering accumulator comprising a third piston dividing the interior of the lowering accumulator into a fifth chamber filled with gas and a sixth chamber filled with hydraulic liquid, wherein the sixth chamber is fluidly connected to the second chamber by a second liquid conduit having a second actuator controlled valve regulating the flow of hydraulic liquid in the second liquid conduit, wherein - the sixth chamber is fluidly connected to the fourth chamber by a third hydraulic liquid conduit comprising an actuator controlled pump unidirectionally regulating the flow of hydraulic liquid from the sixth chamber to the fourth chamber, and - a sensor kit comprising a motion sensing unit registering the vertical movements of the main hydraulic cylinder, - a logical controller unit comprising a processor loaded with a Valve Regulation Module containing logic commands which when executed controls and regulates the actuator of the first actuator controlled valve, the actuator of the second actuator controlled valve, and the actuator of the actuator controlled pump, and - signal transferring lines electronically connecting the logic controller unit to the motion sensing unit of the sensor kit, the actuators of the first and the second actuator controlled valves, and the actuator of the actuator controlled pump.