Do not call "loop" more than twice in your script. "loop" is only for changing the asset (first call) and the algo (second call). If you have more than 2 loop calls, something is wrong in the script.

Due to the special handling of the loop function in training and testing, it can not be arbitrarily called, but only be used in the way described in the manual. Of course, the normal C "while", "for", and "do..until" loops can be used without restriction.

The loop function can handle a string array, but only by passing all elements, such as loop(assets[0],assets[1],... etc.). Unused strings at the end must be 0. We could implement a more comfortable string list handling in a future version.