Resid problem. Dynare can't find ss

Hello every one,
I Have a financial model that I have simplified it to analyse some effects. It is very simple model and I provide external m file to find steady state. When I use external steady state file with the format : filename_steadystate.m , dynare gets an error :

Error using print_info (line 72)
The steadystate file did not compute the steady state.

and I have very small res : like Equation number 9 : 3.2628e-06 for just two variables.

when I remove steady state file and use intval with the values calculated by my external file with “steady(solve_algo = 1)”, I have the same problem, but with “steady(solve_algo = 2);” or commenting out “steady” dynare can find the steady state.
Because I would like to make a loop for parameter “theta” with “set_param_value(‘theta’,i);”, in the second case I have steady state problem, so It seems I have to use external file to find steady state!
I could not find where is the problem, and why dynare gets error for the tiny residual like -1.4996e-05.
I put the mod file and external steady state here. It is appreciated if you reply at your earliest convenience.
nonline_stoc_6_steadystate.m (2.25 KB)
nonline_stoc_6.mod (1.24 KB)

Dear Prof. jpfeifer,
Would you please help me with this issue! I really stuck a the moment! and I cannot go far!

I don’t understand the problem. Why don’t you use the unstable version with

steady(solve_algo = 4,maxit=1000);
That easily works with your file. Using a steady state file to use a numerical solver seems like an overkill. But if you want to got his route, the solution is to increase the precision of your solver by using

options=optimset('TolFun',1e-12); [V,fval]=fsolve(@(x) MN1(x(1),x(2)) ,[1,100],options);

Dear Prof. jpfeifer,
Thank you very much. it solved the problem.

Dear Professor jpfeifer,
In order to solve the previous problem, I got an error: I would like to see how the model changes with changing in “x”, so I have added the last part “set_param”. when I comment out it and manually change "x"value, dynare works well, but when I use “set_param_value” , dynare tells me it cannot find the steady state. May I ask you what is the problem, and how I could get rid of? It seems when the new variable value is set , for the second stoc_simul, Dynare doesn’t use steady state file or the steady state file can’t get the new value!
nonline_stoc_5_steadystate.m (2.43 KB)
nonline_stoc_5.mod (1.71 KB)

That is a clear sign you do not take all parameter dependencies into account. You vary x, but you only once set

before the model block. That will not work.