# COTOpenInterestLegacy

**The installation of the Technical Analysis Package is required in order to access this indicator.**

#### Description <a href="#description_23" id="description_23"></a>

The open interest specifies the number of all currently held contracts; a high open interest, therefore, indicates that the market participants have great interest in this value; vice versa, low open interest shows that a value has only few held contracts and therefore little activity from the market participants. There are two options for calculating the OpenInterest:

1\) Commercial\[Long] + NonCommercial\[Long] + NonCommercial\[Spread] + NonReportable\[Long] = OpenInterest 2) Commercial\[Short] + NonCommercial\[Short] + NonCommercial\[Spread] + NonReportable\[Short] = OpenInterest

Since for every long contract, there is also a market participant on the short side, both calculation methods yield exactly the same value. Additional info: with the CFTC, the open interest is not calculated; the CFTC can simply see the open interest by counting all contracts that are open in the market. With known open interest, the NonReportable positions are then calculated, since the following equation must be valid: TotalReportable + NonReportable = OpenInterest. TotalReportable and OpenInterest are known, allowing the NonReportables to be calculated.

The following parameters are available for the OpenInterestLegacy:

* **CotType:** [*COTReportLegacy*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#COTReportLegacy) – CotType
* **ReportType:** [*COTReportLegacy*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#COTReportLegacy) – ReportType
* **StochasticPeriod:** [*COTReportLegacy*](https://agenatrader.github.io/AgenaIndicator-documentation/indicators_oscillators/#COTReportLegacy)– ComparativePeriod
* **IsNative:** outputs the OpenInterest as an absolute number, just as it is read out from the CFTC reports
* **IsStochastic:** the OpenInterest is outputted and calculated as an oscillator with values between 0-100. With the StochasticPeriod, you can set with which period the Stochastic should be calculated.
* **IsCommercialLong/IsCommercialShort:** select \[True] if you would like to have the data for the NonCommercials displayed. The outputted values are percentages; if, for example, you set IsCommercialLong=True, the percentage of long positions of the Commercials that make up the total OpenInterest is outputted. A value of 0.5, for example, means that the OpenInterest consists of 50% long positions of the Commercials, which can be considered a very large long position of the Commercials.
* **IsNonCommercialLong/IsNonCommercialShort:** if you select \[True], the percentage of NonCommercial long positions i.e. NonCommercial short positions that make up the total OpenInterest is outputted.
* **IsNonReportableLong/IsNonReportableShort:** if you select \[True], the percentage of NonReportable long positions i.e. NonReportable short positions that make up the total OpenInterest it outputted.
* **IsTotalReportableLong/IsTotalReportableShort:** if you select \[True], the percentage of TotalReportable long positions i.e. TotalReportable short positions that make up the total OpenInterest is outputted. (TotalReportable = Commercials+NonCommercials).

#### Parameters <a href="#parameters_22" id="parameters_22"></a>

to be announced

#### Return value <a href="#return-value_24" id="return-value_24"></a>

to be announced

#### Usage <a href="#usage_24" id="usage_24"></a>

to be announced

#### Visualization <a href="#visualization_25" id="visualization_25"></a>

![COTOpenInterestLegacy](https://agenatrader.github.io/AgenaIndicator-documentation/media/COTOpenInterestLegacy.png)

#### Example <a href="#example_24" id="example_24"></a>

to be announced


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/premium-indicators/cot-addon/cotopeninterestlegacy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
