S.Invested is the sum of (shares * latest price) of open positions when MarkToMarket is True (the default).
When MarkToMarket is False S.Invested is the sum of (shares * entry price) of open positions.
To recover this original (cost-basis) investment value when MarkToMarket is True, use S.Invested - S.M2M for a long-only strategy. If short positions are also open, add twice the short mark-to-market: S.Invested - S.M2M + 2 * S.ShortM2M.
For futures positions "shares" above means (contracts * point value), i.e., S.Invested uses notional dollars.
Use Combined or Extern to obtain this value for all strategies or for a specific other strategy or StatsGroup.