Somehow I was under the impression that pipeline always had to be called from before_trading_start. Instead, apparently because it is always there if it is ever there, we can access its content from anywhere. Hmm. So, revising my original comment, removed. By the way here's the fix for the two warning messages ...
context.long_list = context.output.sort(['combo_raw'], ascending=False).iloc[:context.long_num]
FutureWarning: sort(columns=....) is deprecated, use sort_values(by=.....)
context.long_list = context.output.sort_values(by='combo_raw', ascending=False).iloc[:context.long_num]
if stock not in security_lists.leveraged_etf_list:
Evaluating inclusion in security_lists is deprecated. Use `sid in <security_list>.current_securities(dt)` instead.
if stock not in security_lists.leveraged_etf_list.current_securities(get_datetime()):