Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Crossing moving averages and signal types

Hello, I am a new bee to Quantopian and I have been trying to determine if there is a way to code the following:

  • attain a universe where all stocks with average volumes > 1.5M will be considered.
  • attain the SMA10 and SMA22 from the previous day
  • attain the SMA10 and SMA22 from current day
  • compare if previous day's SMA10 < SMA22 is true
  • compare if current day's SMA10 > SMA22
  • print stock name, price, and SMAs for previous and current (log.info)

So far I have not been able to come out with anything successful - either the system

"TimeoutException: Too much time spent in handle_data call There was a runtime error on line 14."