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?
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.