I'd like to program an indicator (not a strategy) in order to backtest a portfolio of five different symbols in one script. The aim is to find out how my trading strategy performs across various symbols and time ranges.
Let's say my strategy is to simply enter a trade on a MA crossup and exit on the opposite signal. How can I perform the necessary calculations for each symbol without generating a lot of code?
Should I use request.security
and call a custom function?
Sorry, this is a real newbie question, I suppose. Any help is much appreciated!