Try looking up the definition of 'arbitrage'
Front running would be if you were say sitting on a broker desk and one of your clients rang up and said to buy lots of A. Then you put in your own buy order before the clients one hits the market. That is front-running. You got in before that knowledge become public. Do you see the difference?
Arbitrage requires that you cross the trade. You've merely described a following Algorithm. One that leaves open long positions.