No, it isn't. For example, both
\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}
and
\begin{bmatrix}\frac{1}{2} & 0 \\ 0 & 2\end{bmatrix}
have the same determinant but are not similar.
Also both
\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}
and
\begin{bmatrix}2 & 0 \\ 0 & 0\end{bmatrix}
have the same trace but are not similar.
And, just in case you were wondering,
\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}
and
\begin{bmatrix}1 & 1 \\ 0 & 1\end{bmatrix}
have the same determinant and the same trace but are not similar.
In order to be similar, two matrices must have the same eigenvalues and the same number of independent eigenvectors corresponding to each eigenvalue.