Failing to Grasp Portfolio Account Calculation

I started my paper trading account with an initial capital of $1m. My portfolio value currently reads $1001474.4; from the dashboard, stocks read $499151.52, while cash reads $502322.88. However, having monitored my the trades made by my bot, the RIOC reads $3100.86. So, if you add $499151.52 to $502322.88, you’ll get $1001474.4. Therefore, where has the $3100.86 gone to? Is it still in my account balance? My current buying power is $3383828.964, and I, sometimes, hold positions overnight.