Your EA checks if there is a position (active trade).
When there is not? it places pending orders in grid when conditions met.
As long as you have no position the EA opens pending orders in grid when conditions met, over and over again.
So do something about the "No postion" block