When the orange line is on top of the blue line, and they cross each other. This generates a buy signal. And when the opposite happens, this generates a sell signal. In this example you can see the purple region is the buy signal region and green region is the sell signal region.