I have no idea what you are asking for here. If you are referring to this video:
The code for that already includes both directions. The scan signals for both directions were already included in the file linked in this video.
Edit: I now understand the request after getting some more details in the comments section below. The request is to take the two separate signals of the scan, turn them into a chart study, and display +1 for oversold signal, -1 for overbought signal and 0 for no signal.
Here is the plot statement from the code provided by the author of the post:
plot scan = pivotLowMACD and highest(oversoldRSI, 4) > 0 or pivotHighMACD and lowest (overboughtRSI, 4) < 0;
Now let's take a look at the two scan signals that were provided in the original scan:
plot scan = pivotLowMACD and highest(oversoldRSI, 4) > 0;
#plot scan = pivotHighMACD and highest(overboughtRSI, 4) > 0;
Do you see how you mistakenly changed the second line from "highest(overboughtRSI, 4) > 0" to "lowest (overboughtRSI, 4) < 0"? That was the first mistake. You did not copy the scan signal for overbought, but instead you modified it in a way that caused it to stopped working altogether.
I only take the time to explain your mistake because you included your code in this post and I perceive that you are trying to learn. Here is what the statement looks like when you combine the two signals to create the +1, -1 and 0 plot values you were trying to achieve:
plot scan = if pivotLowMACD and Highest(oversoldRSI, 4) > 0 then 1 else if pivotHighMACD and Highest(overboughtRSI, 4) > 0 then -1 else 0;