The IRS is not bound by your divorce settlement. They must strictly follow the tax law. Under the tax law, your ex-wife is your daughter's custodial parent, because your daughter lives with her mother. In order to comply with the terms of the divorce and allow you to claim your daughter as a dependent, your ex has to give you a signed Form 8332 releasing the exemption for your daughter to you. You have to file the signed Form 8332 with your tax return.
If your divorce was finalized in 2008 or earlier, then you can claim a child as a dependent who does not live with you by sending to the IRS mail copies of certain pages of your divorce agreement as specified in the instructions in publication 501. To qualify for this treatment, the divorce must say three things clearly in writing; That you can claim the child for certain years, that your spouse agrees not to claim the child for those same certain years, and that there are no conditions on the claim (such as keeping up with visitation or making child support payments).
In all other cases, the noncustodial parent can only claim the child as a dependent if the custodial parent gives the noncustodial parent a signed form 8332.
In both situations, the procedure in TurboTax is the same. You would enter the name and Social Security number of the child, indicate that the child lives with you less than six months, and then indicate that you have received a signed signed form 8332 or that you have a qualifying divorce agreement. The child will qualify for the $2000 child tax credit, but does not qualify you to file as head of household or claim earned income credit. After you e-file your return, you will be prompted to print a cover page which you must mail to the IRS with the original signed form 8332 or copies of the relevant pages of the divorce decree.
The IRS is not obligated to follow any state court decision or state law regarding income taxes. If your ex will not sign form 8332 and release the dependent to you, you can file suit against her in Family Court in your state, but the IRS will not award you the dependent credit without the form.