Oscillations from high energy photons into light pseudoscalar particles in an external magnetic field are expected to occur in some extensions of the standard model. It is usually assumed that those axionlike particles (ALPs) could produce a drop in the energy spectra of gamma ray sources and possibly decrease the opacity of the Universe for TeV gamma rays. We show here that these assumptions are in fact based on an average behavior that cannot happen in real observations of single sources. We propose a new method to search for photon-ALP oscillations, taking advantage of the fact that a single observation would deviate from the average expectation. Our method is based on the search for irregularities in the energy spectra of gamma ray sources. We predict features that are unlikely to be produced by known astrophysical processes and a new signature of ALPs that is easily falsifiable.