Subtract yesterday's position value from today's position value. Then divide that result by the the time-weighted average of year-to-date deposits and withdrawals plus the beginning year account value. Well, I think a software is needed. I recommend 'KBH Investor Accounting' but if the previous day's gain or loss is to also be considered in the time-weighted deposit/withdrawal balance then the software does not offer that method.
I suppose that "position value" is the contract-size times the current price and actually times the number of contracts. Of course a position begins with an opening price and ends with a closing price.
Well, with futures, each ending day is a closing price and each opening day is a new opening price. There's a daily account statement with mark-to-market accounting. The statement has a cash-balance that nets with payments/receipts, with realized gains/loss, with fees, and with commissions to produce a new-cash-balance. So just net the realized gain/loss with the commissions and that's the daily trading gain/loss.