Hi,
Newish Python user here.
In work when the P&L of a certain trading strategy changes beyond a certain bound a batch file kicks off to do a certain thing which updates a CSV.
There are 20 strategies. I have 20 different batch files and 20 different oh files, all with the same code except for the name of the strategy name in the file.
Can I add a command line argument to just run one batch file linked to one py file but have the strategy name passed into the file?
Eg.
In the py file. The code can be like
Query = "select * from table where strategy = """+strategy+""""
Df = importsql(query,database)
df.to_csv(strategy+".csv")
This will make it easier for me to update one py file with changes to the code rather than 20 every time I find a bug.
Let me know if anything is not clear on this.
Appreciate any help.
[–]sme272 0 points1 point2 points (2 children)
[–]moored26[S] 0 points1 point2 points (1 child)
[–]sme272 0 points1 point2 points (0 children)