pk
Level 15
Level 15

Deductions & credits

Most expats use the physical presence test  and since you have more than 330 days  in a continuous 12 month test period, you indeed can declare your tax home to be abroad ( Iraq). This will allow you to claim foreign earned income exclusion.  
Note that -- for example if you went abroad on 10/01/2017 and continued to be  abroad till 05/31/2019 -- then your text period could be as early as 10/01/2017 through 09/30/2018 --- thus your foreign earned income for the period 10/01/2017 through 12/31/2017 would be eligible for exclusion . Additionally your  foreign wages for the tax year 2018 and part of 2019  can also be eligible for  exclusion.  
Any foreign earned income that is not so excluded  and taxed by both USA and the local  taxing authority would be eligible for foreign tax credit.
Does this answer your  query ?  Do you need more help ?