Loop through list of strings

Is it possible to create a loop through a list of strings which would be ticker names? For example loop X through ["AAPL","MSFT","SPY"] to do SetForeign(X) ?

Found the answer: https://www.amibroker.com/guide/afl/foreign.html

You can find plenty of such examples on the forum. The below one is a standard AmiBroker code snippet:

// Iterate through list of symbols
SymList = "MSFT,AAPL,INTC,GOOG"; // any comma separated list can be result of CategoryGetSymbols for example
for( i = 0; ( symbol = StrExtract( SymList, i ) ) != ""; i++ )
{
  // body of the loop
  _TRACE("Symbol is " + symbol );
}