TradingView
n225
14 de Jul de 2017 06:10

Non-commercial Interest Percent Comparison FX 

NEW ZEALAND DOLLAR / U.S. DOLLARICE

Descrição

This script compares IMM CFTC net positioning in percentage terms for several FX instruments.

Load it onto any weekly chart. The data displayed is independent of the chart instrument.

On the Inputs tab, uncheck "Show Legend" to hide the legend (useful if you want to change the plot colours or it is getting in the way).
On the Inputs tab, select "Total OI" to show the net positions expressed as a percentage of Total Open Interest; or "Non-com positions" to show them expressed as a percentage of Non-commercial Longs + Shorts. The default is "Total OI".

On the Style tab, change the plot colours, etc. as necessary. Note that the legend will not reflect the new colours.

This is my first script and I couldn't get some things working as I wanted (such as multi-line declared functions and if-then-else blocks), so sorry the code's a bit clunky. Please feel free to copy and modify it however you wish.

A non-FX version is also available.

Notas de Lançamento

This version allows the latest data from Quandl to be seen at a weekend, before the next weekly bar opens.

Notas de Lançamento

20-Feb-2018 Changed Quandl instrument codes from "AD", "BP", etc. to "232741", "096742", etc. (CFTC codes).

Notas de Lançamento

20-Jan-2019 Replaced MXN with USDX in the FX version, and USDX with CORN in the Non-FX version.
Comentários
fede948
The same version with commercial is possible?
Amraphakafsy
Is it possible to get the non commercial and commercial indicators?

I'll love to have them too
tradingalerts1
I looks like the indicator isn't working anymore as of today. Is it because Quandl isn't pushing this data anymore?

I really enjoyed using this indicator. Thanks for the hard work and putting it out here!
n225
Thank you very much for bringing this to my attention. It seems that Quandl has stopped using the short instrument codes (e.g. "AD" for Australian Dollar) and is now using the CFTC codes (e.g "232741" for Australian Dollar). I have updated this script and its sister script ("Non-FX") with the new instrument codes and it now seems to work again. Thanks!
tradingalerts1
@n225, Thanks a lot n225. Please sent me your bitcoin address so I can tip you some beer money!
n225
Ha ha, no worries mate! We're all sharing for free here... and long may it continue :)
tradingalerts1
@n225, Thanks a lot!
Amraphakafsy
@tradingalerts1, I'll love to have this indicators also. How can I get them please?
joeadante3b
Oh ok, I guess I don't fully understand what the indicator is showing.
n225
It's showing the Non-commercial Net Position (longs - shorts) of the main FX futures at CME, expressed as a percentage of Total Open Interest of those futures. The data is from the IMM CFTC report, which is updated weekly. All the futures use USD as the quote currency. Some currencies are traded more than others,so using Total Open Interest attempts to compare all them like for like. You can see on the chart which ones are doing well against USD, which ones are maybe doing too well (overbought), which ones are doing poorly and which ones are maybe oversold. The history enables you to spot the overbought and oversold levels (which are typically +/- 60%).
I don't recommend trading off this chart though. It's more for guidance, confirmation or warning.
I didn't add more than 8 instruments because it looks like spaghetti the more you add. Even 8 might be too much. But you can find another 8 on the sister indicator mentioned above.
Mais