Search and matching open economy - Blanchard & Kahn conditions not satisfied

Dear all,
I am trying to build a open-economy with search and matching frictions, however I cannot satisfy the Blanchard & Kahn conditions. By reading previous posts on this topic (I’m a Dynare beginner) I understand that maybe there is problem in the timing of the variables, however I still cannot figure it out. May someone help me? Thanks in advance,
Best
Romain
search_model.mod (4.0 KB)

Your timing was wrong, both for the predetermined states as well as the inflation definition:
search_model.mod (4.0 KB)

Dear Johannes,
Thanks of lot for your support, now with your help the code works perfectly.
Best
Romain

Dear Johannes,
Follwoing your message, I modified my code and evreything works perfectly. However I’m wondering what is the conceptual difference for Dynare between coding a inflation rate as

piH = pH/pH(-1) - 1

and

piH(+1) = pH(+1)/pH - 1

From a math perspective, the two equations are equivalent, however it seems that for Dynare they are not as one satisfies the B&K condition while the other one not.
Thanks.
Romain

Dynare’s timing convention means that

piH(+1) = pH(+1)/pH - 1

represents
E_t \pi_{t+1}=E_t\frac{p_{t+1}}{p_t}
i.e., the relation only holds in expectations but it must hold for all states of the world instead.

Thanks a lot for the explanation, it’s very clear for me now.