The Theory Behind Limit Orders