Trading cost doubt

Hi guys, I have a doubt regarding the trading cost when an order is not meet and the price is exchange.
What I understand is trading cost is shares actual acquired*(Av price- Price when enter to the market)

Ej:
Day 0: P= 100
Day 1: send order for 30,000 shares with limit price 99. No fill.
Day closing price: 101
Day 2: send a new order but using as limit price 100
During the day fill 20,000 shares at average price 99.5

What is the trading cost of this?

Or if someone can explain how I have to see it.

Thanks!!

Trading cost in the aggregate should be side*(execution price - benchmark price)*# of share executed

Unclear what the benchmark is here - AP, TWap, vwap etc