See a good intro here.

http://www.rb-trading.com/article10.html