First, what is Net Liq? Net Liq is short for Net Liquidation value. It is displayed at the top of the desktop and web-browser platform, and inside the mobile platform when you expand the platform menu from the bottom. Net liq is the value of your portfolio assumed at the mid-price. In other words, it's the theoretical value of your portfolio if you liquidate all of your positions at the mid-price.
To calculate your portfolio net liq, take the sum of your portfolio's cash balance and the net liq of all of your positions. Your cash balance includes any credit received from short positions as well as any uninvested cash. On the other hand, if your cash balance is negative, then that means you are margining securities. It is not uncommon to see your cash balance greater than your portfolio net liq, especially when you are net short.
Additionally, when a position net liq number is green, it generally is a long position, and it denotes how much cash can be generated from the position at the mid-price. When a position net liq number is red, it generally is a short position and denotes how much cash is needed to cover the position at the mid-price. When taking the sum of your position net liq, your total may be positive or negative.