mtf traffic light indicator - not right when switching charts

 

Hello,

i created an indicator to show some values as a "trafic light". first light has to become orange (same for buy and sell), and the other two green(for buy setup) or red (for sell setup) .

It is al working OK, but now i wanted to see 3 other currency pairs too in the same way, so i copied/paste, change 1 to 2, 3 and 4 etc.

Now i can see all four pairs. But when i change my chart to one of the currencies, the lights give different results, while the should stay the same. I really can't find why that is, the code looks ok to me, so who can spot my error and tell me where i go wrong?

Files: