Set the parameter as Amount = 4 for the Extrude modifier.
We now got our geometry for the horizontal parts of the fence. Move it to the up so that it is situated a little above the ground height.
Now, drag it to the up while pressing the SHIFT button. Upon leaving the mouse button, "Clone Options" dialogue box will appear. Make sure "Copy" options is selected in the Object group. Set the Number of Copise = 2. Then click "OK". That's all for now. We have our fence. But you could play with the various value as your preference. Also, now you can make an opening. That's up to you.