Considering an SMA crossover strategy how can I make my algo loop through different forex pairs, e.g. I entered a trade on EURUSD but my conditions are also met on EURJPY and I want my algo to take the trade.

Currently my code only takes trades one by one and completly randomly not following the SMA criteria.