I have restated your original question which was:
"How to convert an AddCloud into a Def variable"
Because what you are truly asking for is to have a custom chart study converted into a scan. And the "AddCloud" statement is not the target. The elements used to create that green shading is further upstream. So the first thing we do is remove everything below the following line:
plot lower = mean + (-SDmult * SD);
And because you are seeking a scan for the solution, I moved your question out of the "Chart Studies" topic and into the "Stock Scanners" topic. The new title of your question describes the entire context of your request. This will help the rest of our viewers to quickly locate this solution using the search function.
So the solution to convert this into a scan is to realize the green shading is applied only when the DPO line is above the lower line of the standard deviation bands. So the scan signal is merely checking if DPO > lower. Here is the complete solution for the scan:
input price = close;
input dpoLength = 14;
input moboLength = 10;
input sdMultiplier = .8;
def sd = StDev(price, moboLength);
def dpo = price - Average(price[dpoLength / 2 + 1], dpoLength);
def mean = Average(dpo, moboLength);
def lower = mean + (-sdMultiplier * sd);
plot scan = dpo > lower;
Notice how much of that original code has been completely discarded. This is the bear minimum required to complete the scan using the source code you provided.