There are many approaches.

Windows batch files (generic):
https://www.tutorialspoint.com/batch_script/index.htm

You can even write your batch file in Python, or even a Zorro script.

You'll definitely need to know how the Zorro command line works:
https://zorro-project.com/manual/en/command.htm

But the best example I've ever seen of batch scripting can be seen in the Trend Experiment on the Financial Hacker blog (download from "Scripts 2015" in the sidebar):
https://financial-hacker.com/trend-and-exploiting-it/
https://financial-hacker.com/scripts2015.zip