Don't pet your horse, it feels like or seems like your hitting it. Treats aren't always good, because of the high amount of sugar in fruits and molasses in horse cookies. Just rub a horse, because that's what horses normaly do to each other.
Release of pressure, patting them, and then my dressage trainer carries sugar cubes in his pocket and rewards with sugar cubes, he chose sugar cubes because it's sugar and will melt in the mouth so the horse won't choke trying to eat it with the bit while riding
Pressure, release, reward. The reward is in the release of pressure. Horses learn from the release of pressure, not the pressure itself. Timing is important, and it may take a little while for you to figure out the correct timing. That's okay. Hope this helps.