Its losing water as in coolant? Does the exhaust come out white? Could be a bad head gasket. Your plugs are getting wet causing the misfire and the o2 is getting a bad reading from the extra moisture. The reason why unplugging the battery is working is because your resetting the computer. Now the computer is in "reading mode" trying to gather information rather then applying it. After its done reading now its going to apply what it thinks is right based off the information its gathered. If it was getting bad information from the o2, its going to start making wrong corrections.
2005 ford ranger edge 4x4
ford 9" rear, dana 44hp front, 14" fox coilovers, 12" of lift. 38.5x15x15 boggers