Difficulty in using a custom indicator using COT Sentiment and Open interest

Hi,
I want to apply a custom indicator to my futures data.
The indicator is the COT sentiment indicator divided by Open Interest.
I’ve added this in Custom Codes: COTS()/OI() .
I am having difficulty in applying it to my futures charts.
When I insert it in a new window (right click on the chart, left click the chart icon, left click “New Window”) under the chart of an individual commodity (eg Wheat, Japanese Yen, TBonds etc) nothing appears.

Do I need to formulate individual custom codes for each individual commodity/futures contract?

Thanks in advance.
Damian Clarke

Hi Damian,

You can use this on Wheat

COTS(DATA=001602-CPLA-WHEAT-SRW) / OI()

The issue is that the auto selecting does not seem to work in scripts. That is something I will log to be looked at.

The other issue you have is that Open Interest can fall towards the end of the contract unless it is OI rolled (something we plan to offer later this year). In this chart the green plot is that script and you can see the spikes it creates.

Hope that helps

Mathew

cot

Thanks so much Matthew

Hi Matthew,

I’m writing the script in custom codes. I assume this is correct?

How do you insert in the window under the chart (is my description correct). I’m not having any luck.

Regards,

Damian

Hi Damian,

You could, then you would have a code that you can use for each commodity.

I used a “Show View” tool and changed the script.

All the best

Mathew