You are missing a closing bracket ( ')' ) at the end of the condition thing for your while statement and "..." is never declared. You might also want to use && as opposed to ||. I don't know, just try one, if that doesn't work, use the other, but I'm pretty sure that you will need && ("while command doesn't equal 'X' AND Rd doesn't greater than 10001"). I don't think that !< (not less than) and !> (not greater than) are valid, just use < (less than, or not greater than) or > (greater than, or not less than).
I am answering this assuming that you mean the loop will stop when EITHER one of these conditions evaluates to TRUE:
1) command is equal to 'X'
2) Rd is larger than 10001
3) Rd is smaller than 0
4) Cd is larger than 10001
5)Cd is smaller than 0
Like I said, if your goal is to exit the loop when either one of the above statements is true then the correct form of the while statement should be: