why is this code not taking any trades when backtesting?