A good rule of thumb when you start out is to start to notice which planes are below, level (co-alt), and above you, and never chase the planes above you. Eventually this will change, as you get better at estimating your Energy state, their Energy state, and you will know which of those above planes you can safely catch without stalling out, and still have time to nose back down before you get jumped by his buddies.
As for now, understand that planes higher than you may seem tempting, but usually to a bogey in the area (often it is that very pilot above you) you just look like a big fat target when you nose up and get slow.