RealTest User Guide
RealTest User Guide

 

 

Navigation: RealTest Script Language > Syntax Element Details >

S.LongInv

 

 

 

 

Category

Test Statistics Arrays

Description

Total dollar value of currently open long positions

Notes

S.LongInv is the sum of (shares * latest price) of open long positions when MarkToMarket is True (the default).

When MarkToMarket is False S.LongInv is the sum of (shares * entry price) of open long positions.

To recover this original (cost-basis) long investment value when MarkToMarket is True, use S.LongInv - S.M2M for a long-only strategy. If short positions are also open, add the short mark-to-market: S.LongInv - S.M2M + S.ShortM2M.

For futures positions "shares" above means (contracts * point value), i.e., S.LongInv is the notional dollar value of open longs.

Use Combined or Extern to obtain this value for all strategies or for a specific other strategy or StatsGroup.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC