I use a triple fisherman's knot, but cut it so it is just a piece that slides.
Learn to tie the Triple Fisherman’s Knot for fishing. See detailed instructions, pictures, tutorials, and videos for the Triple Fisherman’s Knot, also known as Triple Fisherman’s Bend.
www.knotsforfishing.com
Imagine only tying one side on the link above and then cutting it short. It would just slide around. I leave a little bit of tag end and on the side toward the tree, I give the tag a few wraps of duct tape so that it really wedges. I like this knot because you can grab both tag ends and give a tug to tighten it up whenever you'd like so it doesn't slide as easily and the taped tag end works well for retention.
There's a more complicated knot that looks cool that I'm sure someone will also post soon.