Calculation of arbitrage profit
The formula for sell_order_Net_total will be:

 sell_order_Net_total = sell_amount * sell_price * (1- sell_ex_txn_fee)


The final profit:

Profit = sell_order_Net_total - buy_order_Net_total


Keep in mind that there are also transaction fees between the two exchanges. If you have traded all your DOGEs for BTC on 1 exchange, and BTC for DOGEs on the other, you'll want to mix both accounts with an equal amount of DOGE/BTC. The transaction fees should also be accounted for if you want to trade between exchanges.