I will prove a stronger
Claim: Let $A$ be a $g$-dimensional abelian variety over $\mathbb{Q}$, let $N_A$ be its conductor, let $D$ be a squarefree integer, let $\psi_D$ be the Dirichlet character associated to $\mathbb{Q}(\sqrt{D})$, and let $A^{(D)}$ be the twist of $A$ by $\mathbb{Q}(\sqrt{D})/\mathbb{Q}$. If $N_A$ is coprime to the discriminant of $\mathbb{Q}(\sqrt{D})/\mathbb{Q}$, then the root numbers $w(A)$ and $w(A^{(D)})$ are related by $$w(A^{(D)})w(A) = \psi_D((-1)^g N_A).$$
Proof. The LHS equals $w(A_{\mathbb{Q}(\sqrt{D})})$; this is "standard", but let me know if you want references (note though that the corresponding formula for local root numbers fails but the local correction terms multiply to $1$ over all places). Expressing as a product of local root numbers, we get that the LHS is $$\prod_{v\mid N_A \infty} w(A_{\mathbb{Q}(\sqrt{D})_v})$$ ($v$ is a place of $\mathbb{Q}(\sqrt{D})$). The RHS, on the other hand, equals $$\psi_D((-1)^g)\prod_{p\mid N_A} \psi_D(p)^{f_p(A)},$$
where $f_p(A)$ is the conductor exponent of $A$ at $p$. Let us compare the two products term by term:
- $\psi_D(-1) = 1$ iff $\infty$ splits. Since the local root number of a $g$-dimensional abelian variety at an infinite place is $(-1)^g$, we see that $\psi_D((-1)^g)$ matches with the product of the factors contributed by $v\mid \infty$ in the first product.
- If $p$ splits, then $\psi_D(p) = 1$, whereas the places $v\mid p$ in the first product contribute two identical $\pm 1$ terms, which therefore multiply to $1$.
- If $p$ is inert, then $\psi_D(p)^{f_p(A)} = (-1)^{f_p(A)}$. If $v$ is the unique place above $p$, then, since $\mathbb{Q}(\sqrt{D})/\mathbb{Q}$ is unramified at $p$, one also has $w(A_{\mathbb{Q}(\sqrt{D})_v}) = (-1)^{f_p(A)}$; for the latter equality, let me shamelessly refer you to Thm. 1.12 of http://arxiv.org/abs/1402.2939.
- Ramified $p$ give no contribution to either product: afterall, we have assumed that $A$ has good reduction at all such $p$.
In conclusion, the products are equal and we're done.