Water hammer is to do with vibrations being set up in the pipework. It generally occurs in the cold water system when one particualr tap is turned on.
If you are saying that this banging only occurs whilst your CH is on, it is most unlikely to be water hammer. It is caused when the hot water flows through copper pipes that are mounted through notches cut in joists. When the system goes on (and the water in the pipe heats) it also heats the copper pipe which expands slightly, the expansion results in movement of the pipes in relation to the fixed joists through which they are mounted and the lateral movement causes a slight bang or scraping. The fault is in the way the pipes have been mounted - if they are too tight in the notches they can't move freely. The reverse happens as the system cools (although the heat up is generally the worst as heating occurs quickly whilst cooling occurs slowly).
If this sounds like a description of the problem you've got, it is somwhat surprising that a plumber can't tell you that.
Putting it right is fiendishly difficult and potentially expensive; floorboards have to be lifted and notches widened a fraction, or felt strips put below the pipes to slide on.
You may have to live with it.