Hey everyone Im new to Python and Quantopian, though not to trading .
I need to compare a number of items and Im not sure how to go about doing it in Python.
1) see if the current day mavg(10) <= yesterdays mavg(10). I know the mavg(10) gives me the 10 day moving average but Im not sure how to put them inside the program. I tried 10_day = data[context.security].mavg(10), and then calling _10day [0] <= _10_day[1]. That returned an error
2) I need to also compare the last 10 days and log the up and down days, store the down days and then store the highest down day volume value as a variable, then compare todays volume to that bar and see if its higher. I havent tried to script this as of yet however I am aware that I need to loop through the days?
That should be a great start for me and give me some ideas on how to move forward. Any help would be appreciated. Thanks!