I think I know how to get history during OnData while using a universe.  However I would like to know which is the 'best' way in terms of efficiency / speed.

So for example:
1) Daily the stocks change (default universe setting)
2) Each day I would like to analyze each stock's daily history going back X days (on the order of months)

Because I'm using a universe I can't simply do a warmup and save the data manually.  I am aware of the built-in indicators (like EMA etc) so if it could be made clear how to create my own indicator, that would be a good answer to this as well.

Thanks