Commitment Of Traders (COT)
Description
The COT indicator plots weekly data from the Commitment Of Traders report, indicating holdings of different participants in the U.S. futures market.
Notes:
- Since the underlying COT reports are a weekly figure updated every Friday, it would not be meaningful to run this study outside Calculate.OnBarClose.
- Default values of the 5 hard-coded plots are: 1 - Futures Non Commercial Net, 2 - Futures Commercial Net, 3 - Futures Non Reportable Positions Net, 4 - Futures Open Interest, 5 - Futures Total Net.
- To access other reports and report fields, please see the 2nd example below. All fields available could be seen via Intelliprompt in the NinjaScript editor.
- In the CotReportField enum, “Pmpu” represents: “Producer/merchant/processor/user” where CotReportField.PmpuNet would represent: “Producer/merchant/processor/user Net”.
- If a CotReportField enum is used that is not supported by the ReportType, OpenInterest will be seen.
Syntax
COT(int number)
**Returns Cot1 value **
COT(int number).Cot1[int barsAgo]
**Returns Cot2 value **
COT(int number).Cot2[int barsAgo]
Returns Cot3 value
COT(int number).Cot3[int barsAgo]
Returns Cot4 value
COT(int number).Cot4[int barsAgo]
Returns Cot5 value
COT(int number).Cot5[int barsAgo]
Return Value
double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.
Parameters
Examples
Source Code
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.