Let $I$ be a fractional ideal of a real quadratic number field $K$ of discriminant $D$. I thought a little bit about traces of ideals and want to ask if the following is correct. I have a proof for the statement, but it confuses me a little bit why I want you to double check the statement:
Let $J:=II'=N(I)\mathcal O_K$. Then
$$\operatorname{tr}(J) = \begin{cases} 2N(I) \mathbb Z,\quad & D \equiv 0 \pmod 4,\\ N(I) \mathbb Z,\quad & D \equiv 1 \pmod 4. \end{cases} $$