Just trying to select 200 securities with second-resolution triggers a memory problem for me. See the super-simple attached code.

I am getting this error:

> Runtime Error: Execution Security Error: Memory Usage Maxed Out - 4096MB max.

And I also get this message:

> We currently only support 30 second at a time due to physical memory limitations

The code illustrates the problem without doing nothing, but what I would like to do is to select securities based on previous day closing price and current day opening price. I understand this is not possible with universe selection, so I need to fetch a broad universe and do the filtering manually on the `OnData` method. Maybe I am just using the wrong approach, but it is weird to me that just selecting 200 securities hits the memory-limit.

 

Author