This topic will give you some more info on reinforcing/defending, and how it works.
To be or not to be (Hidden or Unhidden)
Unhidden troops are able to defend your city. You can see if your troops are hidden/unhidden by going to your keep>overview>hide all troops (on/off). Your troops will be used to defend incoming attacks when they are unhidden. To maximize your stats while defending, your highest level Hero should be in the Training Position in your Great Hall. If you have a level 9 Watch Tower, you can see the incoming attack’s Hero level, if it’s higher than yours, you will most likely have more losses than them, so it’s a good idea to hide at that point if they are sending a lot of troops because you could get zeroed. Only open when you think you are going to have a better ratio of kills to death.
Hidden troops will not be able to defend your city, and if you have resources over your protection limit, they will be stolen. If you are hidden and have have unprotected resources that you want to keep, you can send them to another member in your ally before the attack hits. Unprotected resources are those which are over your protection limit. You can see how much resources are protected by tapping on your resource tab at the top and look what your protection limit says. A level 9 vault can protect 900k resources, if you have level 9 strongbox research along with that, you will be able to protect 1.71m of each resource (not gold).
When asking for reinforcements you should have your troops unhidden and your highest level hero in the training position in the great hall. Do not abuse reinforcement requests, you should only ask for them when the attacker is sending enough troops to wipe your own army out. When reinforcing, if you are a dwarf and reinforce an elf, and the attacker is an elf, the dwarf will be attacked first until there is no more dwarf troops, then the elf will attack the elf. Same goes for an elf reinforcing a dwarf and a dwarf is attacking. The elf will be killed first then the dwarf troops will get attacked.
Troops kills from a reinforcing army go to the player who is defending not the reinforcements.