Hi everybody, I have the following part of a Pyhton script:
Blockquote
listatitoli = [“A2A.MI”, “ABT.MI”, “ACE.MI”, “AC5.MI”, “AEF.MI”, “ADB.MI”, “ARN.MI”]
#Inizio analisi titoli
max_values_11_days =
Faccio l’append dei primi 11 max dalla colonna High
for row in range(len(df) - 1):
max_values_11_days.append(df.iat[row, 1])
maxdi11gg = max(max_values_11_days)
maxdodicesimogg = df.iat[11, 1]
#Stabilisco se il max di oggi è maggiore degli 11 precedenti
if maxdodicesimogg>maxdi11gg:
OM = open(‘/Users/fabry/upovermax12gg/overmax12gg.csv’, “w”)
OM.write(“ABT \n”)
OM.close()
Blockquote
My problem is that I’m unable to run the script for ALL of the stocks in the list. I tried with a single one (ABT.MI) and it works, but I wish:
- script must automatically run for every stock in the list (listatitoli)
- instead of ABT.MI, Python must analyze and write every single stock from the list
I hope I was clear and thank you in advance,
Andrea