how to refer average holding cost Is there any variable?

buy 100 stocks of company x at Rs10 day before yesterday and
buy 100 stocks of company x at 12 rs yesterday

so now my average holding cost of company x share is Rs11

in Pi backtesting exit script how do i refer this value which variable has this value ??