Thanks AndrewAMD! You are absolutely right! I just did not think about the fact that the statements are called repeatedly!

In my original strategy I have a asset loop like:

while(asset(loop(Assets)))

I thought the parameters are initialized again after each asset switch. My mistake. I did not want to modify the assetlist as this can be forgotten when you are updating the list.
A simple

if (is(FIRSTRUN))

is doing the job now.
Thanks again Andrew!