Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Can't figure out why my Pipeline-Algo isn't working

Hello Everyone,
I built an algorithm to find only stocks hitting new 52-Week Highs using the pipeline and then the built in TALIB to get MACD information on each stock and trade them accordingly. For some reason, it's not trading, but I'm getting data out of the pipeline perfectly and the MACD part of the program works perfectly well with other pipelines that I've created. I can't figure out why it's now working, but I think it has to do with my rebalance() function not interpreting the pipeline data correctly. Any help would be greatly appreciated!
Thank You All!

2 responses

You need to schedule the rebalance() function. Add something like schedule_function(rebalance, date_rules.week_start(),time_rules.market_open()) somewhere in the initialize(). In rebalance() remove .index i.e. context.security_list.index -> context.security_list

Thank You VERY MUCH! That worked perfectly, but I decided to go with a executing my orders under a handle_data() function instead of in the rebalance() function because I wanted to check the MACD data every trade minute. But again, thank you very much!