open_interest ( String symbol, Any period, String priceType);
period: "<current period>"
priceType: "<current type>"
Returns the open interest value for the specific symbol, aggregation period and price type. You can use both Aggregation Period constants and pre-defined string values (e.g.
Month, etc.) as valid parameters for the aggregation period. The full list of the pre-defined string values can be found in the Referencing Secondary Aggregation article.
Valid parameters for the price type are:
MARK. Alternatively, you can use the PriceType constants.
Note that for non-Forex symbols, the last three are only supported on intraday charts with time interval not greater than 15 days.
|symbol||current symbol||Defines symbol for which the open interest is returned.|
|period||current aggregation||Defines aggregation period for which the open interest is returned.|
|priceType||current price type||Defines the type of price for which the open interest is returned: Last, Ask, Bid, or Mark.|
plot OpenInterest = open_interest();
This example script draws the open interest plot for the current symbol.