Travelling waves have been studied to characterize the complex spatiotemporal dynamics of the brain. Several studies have suggested that the propagation direction of travelling waves can be task-dependent. For example, a recent EEG study from our group found that forward waves (i.e. occipital to frontal, FW waves) were observed during visual processing, whereas backward waves (i.e. frontal to occipital, BW waves) mostly occurred in the absence of sensory input. These EEG recordings, however, were obtained from different experimental sessions and different groups of subjects. To further examine how the waves' direction changes between task conditions, 13 participants were tested on a target detection task while EEG signals were recorded simultaneously. We alternated visual stimulation (5 s display of visual luminance sequences) and resting state (5 s of black screen) within each single trial, allowing us to monitor the moment-to-moment progression of travelling waves. As expected, the waves' direction was closely linked with task conditions (visual processing vs. rest state). First, FW waves from occipital to frontal regions, absent during rest, emerged as a result of visual processing, while BW waves in the opposite direction dominated in the absence of visual inputs, and were reduced (but not eliminated) by external visual inputs. Second, during visual stimulation (but not rest), both waves coexisted on average, but were negatively correlated. That is, when the FW waves were stronger than expected based on alpha amplitude alone, the BW waves tended to be weaker, and vice-versa. In summary, we conclude that the functional role of travelling waves is closely related with their propagating direction, with stimulus-evoked FW waves supporting visual processing and spontaneous BW waves involved more in top-down control.