This sounds like you may have developed a physical urticaria. This is a condition in which hives
form on the skin in response to physical stimuli, in your case things like scratching the skin or applying pressure. In fact the type of physical urticaria where the red marks mostly form only when the skin is pressured or scratched is called dermatographism, which is the most common form of physical urticaria. This is likely what you have.
Most of the time, physical urticarias happen for unknown reasons. The encouraging flip side of this is that they are rarely associated with serious underlying illness
like cancer or celiac, although it is always important to have a thorough examination and checkup by your regular doctor
Most physical urticarias can be managed with taking daily anti histamine medications, usually at a higher dose than would normally be used for typical allergy symptoms. You should talk to your doctor about this first; if a trial of anti histamines doesn't work for you, then that would be the appropriate time to seek a referral to an allergy specialist. An allergy specialist can perform additional testing to confirm the diagnosis and is also more skilled in dealing with the more difficult to treat cases of this condition.