Hi,
Newbie here.
I have read the pipeline tutorial but I don't see how I can get the history in order to add a filter for: the 200-day moving average line is trending up for at least 1 month.
I know how I would get the 200-day moving average for the day (ma_200 = SimpleMovingAverage(inputs=[USEquityPricing.close], window_length=200) but how can I calculate the moving average of the last 20 days?
Thanks