Kian,
That's a tough question, is your code good enough to trade live? I'm also pretty new to algo trading, so I don't have any wisdom for you, just my perspective. As far as the strategy goes, your guess is as good as mine, so I don't have any advice there, but I can give you my objective opinion regarding code implementation.
I saw that you're only using the middle band of talib.BBANDS. The middle Bollinger band is a 20 day moving average (as coded), so your code can be simplified to use 3 different moving averages. Do you know that you're not actually using bollinger bands? I also found a couple redundant statements, which makes it seem like there could be holes in the analysis of the underlying strategy.
For algos that depend on moving average crossovers and other boolean triggers, I would suggest starting with the math and a visualization of the possible states your algo can take on. Representing the states as a matrix of boolean variables (or nodes on a graph) can help you simplify a strategy into a clear/concise form before coding it up.
My workflow is something along these lines:
1. Research
2. Backtest, if not satisfied, go to 1.
3. paper trade, if not satisfied, go to 1, or back to 2 and adjust.
4. Trade it live, if satisfied, it goes in the strategy portfolio, else, trash it and return to 1.
5. Re-assess
6. go to 1.
I'd be careful testing strategies that short stocks through the financial crisis because there was a period of time where short sales were either not allowed, or difficult to execute. If you are the only one allowed to short, you'll probably make a killing doing it. Your algo is a good example of that effect.
If you have not checked out zipline, Quantopian's backtesting engine, I recommend you do. Working with zipline will help you understand the tools you are working with. Because we rely on software to execute strategies, it's on you to play forward possible scenarios, and incorporate those views into your software. There will always be outside influences, like liquidity/slippage, but if you know how your code behaves (and that it works), you're probably heading in the right direction. It will also be easier to identify the issues you run into. Code does exactly what it's programmed to do. That means you need to thoroughly understand what you've written, if you are satisfied with the strategy, paper trade for a while, and then send it live.
Investing is risky, we can't eliminate the risk, but if it's managed intelligently, you can learn from mistakes and have the capital to trade another day. At the end of the day, we're all more or less feeling around in the dark, experienced traders might have a candle, but it's still a dimly lit room at best. Trading stocks successfully over the long haul requires sound strategy and a sense for the market, but it's always a learning process, the trick is to stay in the game.
I'd love for somebody with more experience to weigh in on this, otherwise it's just the blind leading the blind.
David