There are two issues with your calculation:
- You are assuming that you are both a Maker and Taker (either maker when buying and Taker when selling, or taker on the buy and maker on the sell) which could be true, but might not always be the case
- You are calculating both fees based on the Buy Price (which is not accurate because the corresponding maker/taker fee is a percentage of the selling price too).
Your calculation only makes sense if you are being charged both maker- and taker-fees and your buyPrice == sellPrice. Which will never be 0 because if you are buying and selling at the same price then you lose out on the fees.
If both orders were maker orders your calculation would be:
Break Even would be when: (sellPrice * (1 + maker)) - (buyPrice * (1 + maker)) = 0
If the buy was a maker order and the sell a taker order:
Break Even would be when: (sellPrice * (1 + taker)) - (buyPrice * (1 + maker)) = 0
You would need to extend these scenarios for all 4 possible permutations of the maker/taker fees.