Translating a sentence into predicate logic "A dragon is happy only if it has a green child".

Have I translated this statement correctly into logic (below)?

$\forall X \cdot dragon(X) \wedge happy(X) \Rightarrow \exists Y \cdot childOf(Y,X) \wedge green(Y)$

$childOf(Y,X)$ is true when $Y$ is a child of $X$.
This is correct, if you make sure that $\forall X$ quantifies the whole statement, i.e. if you write:
$$\forall X\big(dragon(X)\land happy(X)\to \exists Y\left( childOf(Y,X)\land green(Y)\right)\big)$$
I think it is necessary to be more careful. Here we are dealing with 'only if' and not 'if'.
The correct translation is the following. 

Dx: x is a dragon

Cxy: x is a child of y

Gx: x is green

Hx: x is happy

$$  \forall x ((Dx \wedge \exists y (Cyx \wedge Gy))  \to Hx) $$