To have a trick up your sleeve: This means that you have a secret plan or strategy that you will use at the right time in order to be successful. This hidden trick will surprise your opponent. The idiom probably comes from the world of performing magic.