I am trying to do a long/short algorithm. I have looked around at a lot of different discussions and found some answers to fix issues but, I am still getting insufficient buying power errors. I want to short sell first to be able to take that money that I get to invest more into the long position. I also tried running it live and get invalid oder status probably due to the buying power issue. 



**my work is on the main.py file**