Can I offset my stock trading loss against my rental income?

For my stock long-term stock trading loss, does it offset first against my rental property rent income then against my ordinary income up to $3,000? Thanks!