I made the change.

Now I get the price graph of the last pair in the function (GBP/USD), and the function output plot gives the price of the last pair in the "while" loop. Since it is not the average, or half of the price of the last pair, can one conclude that each loop in the function takes only a single pair at a time (and thus plots the last pair in the "while" loop)?

Maybe I am missing something?