I found this function in a different thread.... How can I transfer this for this operate? When I put it in one and put it within a start function, it gives me errors... also, is there a way to do it without using a Global factors?

Global Factors
Inserted Code string Symbols#91;#93;; int SymbolCount;
Inserted Code // ------------------------------------------------------------------ //| Creates the variety of pair symbols to assess | // ------------------------------------------------------------------ string CreateSymbolList() string allsyms; string Currencies#91;#93; = AED, AUD, BHD, BRL, CAD, CHF, CNY, CYP, CZK, DKK, DZD, EEK, EGP, EUR, GBP, HKD, HRK, HUF, IDR, ILS, INR, IQD, IRR, ISK, JOD, JPY, KRW, KWD, LBP, LTL, LVL, LYD, MAD, MXN, MYR, NOK, NZD, OMR, PHP, PLN, QAR, RON, RUB, SAR, SEK, SGD, SKK, SYP, THB, TND, TRY, TWD, USD, VEB, XAG, XAU, YER, ZAR; int CurrencyCount = ArrayRange(Currencies, 0); int Loop, SubLoop; string TempSymbol; for(Loop = 0; Loop lt; CurrencyCount; Loop ) for(SubLoop = 0; SubLoop lt; CurrencyCount; SubLoop ) TempSymbol = Currencies#91;Loop#93; Currencies#91;SubLoop#93;; if(MarketInfo(TempSymbol, MODE_BID) gt; 0) ArrayResize(Symbols, SymbolCount 1); Symbols#91;SymbolCount#93; = TempSymbol; allsyms = allsyms TempSymbol n; SymbolCount ; TempSymbol = Currencies#91;Loop#93; Currencies#91;SubLoop#93; m; if(MarketInfo(TempSymbol, MODE_BID) gt; 0) ArrayResize(Symbols, SymbolCount 1); Symbols#91;SymbolCount#93; = TempSymbol; allsyms = allsyms TempSymbol n; SymbolCount ; return(allsyms);