Are there any guidelines around this? For example, if I was doing a simple moving average crossover strategy over the whole universe of stocks, would I use data.history in my scheduled function and create the moving averages there, or should I do it in the data pipeline?
Also, another thing, if I screen data in the pipeline and day 1 I go long a stock, but that stock gets screened out over the next days, how will the algo know to sell if there is no data for it (as it's screened out)?
ie if I screen for stocks over $5, then I buy at $6, then the stock goes under $5 and gets screened out.