I am new here, I have a basic understanding of python and I started by downloading an intraday database and have found multiple algorithms that I believe to be strong. Now I am struggling to implement the algorithms to live trading here. I usually don't post in forums but I have spent countless hours reading with no luck. So this is my problem:
I do not understand the logic behind the classes that must be called and narrowing the universe. This doesn't seem to follow general python language, I have read about the initialize(context), handle_data(context, data) etc. But what I do not understand is what these actually mean on the basic level. What is context the context and data that is being passed?
I am specifically wanting to scan for all stocks over 25% on the day, is there a way to initialize all stocks?
Can I do a nightly scan for all stocks over 25%, if so would that be in a schedule_function, and can schedule function stand alone?
Then, I want to update the universe into classifications based on the gap, days gain percentage, and the opening price in relation to standard bollinger bands (2,20). Also, I'd like to access the open, close, low, and high of the day of gain. I don't want to get rid of the fully scanned universe but just classify them based on these.
I want the buy and sell point to be based on the crossing of various bollinger bands.
1) At night, scan all stocks for 25% gainers.
2) Same night, extract data... previous close, open, high, and close to perform calculations.
3) Upon market open the next day, calculate gap, calculate relationship between open price and bollinger bands.
4) Given whatever the categories, if it crosses a specific bollinger band, buy, and a second cross of another band, sell.
I apologize for my lack of experience, what really seems to be standing in my way is the basic understanding of the classes, how to call them, and what they actually mean. I have searched at least 100 hours on these basic problems with no luck at all.
I appreciate any help you can give, and if you don't have much time, mainly I would like to know how to scan the full universe and extract market data into a list. If I could just scan for the specific stocks and get the data for each stock into lists I think I could figure out the rest. A detailed logical overview of how the definitions work would also be greatly appreciated.
If the pipeline is necessary, a basic overview of what exactly is going on when a pipeline is created would also be greatly appreciated. Thank you so much! Hopefully, I will get this figured out with a little help!