What does this code signify?

#1
Code:
Opt1 	= Param("% Zig (Change)",0.1,0,1,0.05);
Opt2 	= Param("Min. Allowable Duration",1,1,20,1);
Z 		= Zig(C,Opt1);
Buy	= Z < Ref(Z,1) AND Z < Ref(Z,-1);
Sell	= Z > Ref(Z,1) AND Z > Ref(Z,-1);
Buy 	= Buy AND BarsSince(Sell) > Opt2;
Sell 	= Sell AND BarsSince(Buy) > Opt2;
Short = Sell;
Cover	= Buy;
i know this code is useless for day-trading as it uses zig, but what exactly does this code mean? when is it showing to buy and sell?

thanks