Has anyone succeeded in monitoring multiple instruments from a single script for positional trading. I don't want to use websockets because I need to form the candle on my side. I want to use historical data api to calculate RSI, MACD etc and enter trades based on different criteria for different instruments. I currently have one script and I pass the instrument name and other indicator periods are command line arguments. If I want to run the same script for 10 instruments then i need to run 10 copies of the same. It is difficult to manage in longer run. I want to avoid that and do this in one script with multiple sub processes or threads. Has anyone tried this or any other approach?
P.S: I think threads will not work as the global variables will collide with each other. Is sub process the right option?