buyConfirmation = close > open and close[1] > open[1]
sellConfirmation = close < open and close[1] < open[1]
finalBuy = filteredBuy and buyConfirmation
finalSell = filteredSell and sellConfirmation