The present invention discloses a seven-colored swinging electronic candle, which comprises a candle body, a cavity is arranged in said candle body, a support is arranged in said cavity, a support frame which can swing around, is installed on said support, a candle wick is fixed in said support frame, wherein said candle wick comprises a flame front and a candle end which is connected to said flame front, a light-resisting body is arranged on the surface of said flame front, a permanent magnet is arranged below said candle end, an electromagnetic coil is arranged just under said permanent magnet; outside said support, the support bases are arranged above said candle body; a colorful light-emitting body and a white light-emitting body are respectively arranged on said support bases, the light from said white light-emitting body illuminates on said light-resisting body. The electronic candle described in the present invention has a dynamic effect, rich light colors, a strong aesthetic feeling, and a high simulation degree.