Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
error when ordering all stocks

Error if I change to:

for stock in context.security_list:  
        order(stock,1)  

Error:

Something went wrong. Sorry for the inconvenience. Try using the built-in debugger to analyze your code. If you would like help, send us an email.

Oddly, when run on testdrive, this error results:

There was a runtime error.
MemoryError
Algorithm used too much memory. Need to optimize your code for better performance. Learn More

Ref.: https://testdrive.quantopian.com/posts/memory-error