We don't support 1040NR in this forum.
It seems if you had a capital loss carryover from US source income the prior year, you would be able to claim it against US income in the current year.
Here's Instructions for Form 1040-NR to help you.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"