Investment Studio > Expressions > Functions > Lookup > ASSET_FLAG
string asset_flag(integer asset_index, date quote_date)
Returns the latest transaction flag as of quote_date for the asset specified by asset_index.
A transaction flag is an arbitrary string field which can be set automatically by trading system rules or manually in the Transactions view, and read using the asset_flag and portfolio_flags functions. Its interpretation is up to you. For instance, it can be used to keep track of state changes in a trading system, or to give the Portfolios or Assets views advance warning about the trading system's intents for tomorrow, before the quotes needed to book actual transactions become available.
Asset indices are references to entries in Investment Studio's internal table of assets in the selected portfolio. The table is automatically created and maintained behind the scene, and may be rearranged at any time. Asset indices should therefore never be specified using constants, but rather obtained through the interface methods provided by the object hosting the expression (if need be with the aid of the transaction_asset function). See e.g. the discussion of lookup cells in Grid objects.
See also portfolio_flags.