Greeny

COT (Legacy): Noncommercial Interest

Open Interest for non commercial traders from legacy commitment of traders ( COT ) report. For the main symbol but also allows to override it. Also allows to include options in consideration.
お気に入りスクリプトからの削除 お気に入りスクリプトに追加
study("Noncommercial Interest", shorttitle="Noncom Int", precision=0)
force_root = input("", title="Override Product")
is_includeoptions = input(false, type=bool, title="Include Options")

fxroot =
	  ticker == "USDCAD" ? "CD" : 
	  ticker == "USDCAD" ? "CD" : 
	  ticker == "USDCHF" ? "SF" : 
	  ticker == "USDCZK" ? "CZ" : 
	  ticker == "USDHUF" ? "FR" : 
	  ticker == "USDILS" ? "IS" : 
	  ticker == "USDJPY" ? "JY" : 
	  ticker == "USDMXN" ? "MP" : 
	  ticker == "USDNOK" ? "UN" : 
	  ticker == "USDPLN" ? "PZ" : 
	  ticker == "USDRUB" ? "RU" : 
	  ticker == "USDSEK" ? "SE" : 
	  ticker == "USDZAR" ? "RA" : 
	  ticker == "EURUSD" ? "EC" : 
	  ticker == "AUDUSD" ? "AD" : 
	  ticker == "GBPUSD" ? "BP" : 
	  ticker == "NZDUSD" ? "NE" : 
	  ticker == "BRLUSD" ? "BR" : 
	  ""
root = force_root == "" ? fxroot == "" ? syminfo.root : fxroot : force_root
code = root + (is_includeoptions ? "_FO" : "_F") + "_L_ALL"

is_inversed = 
	  ticker == "USDCAD" ? true : 
	  ticker == "USDCAD" ? true : 
	  ticker == "USDCHF" ? true : 
	  ticker == "USDCZK" ? true : 
	  ticker == "USDHUF" ? true : 
	  ticker == "USDILS" ? true : 
	  ticker == "USDJPY" ? true : 
	  ticker == "USDMXN" ? true : 
	  ticker == "USDNOK" ? true : 
	  ticker == "USDPLN" ? true : 
	  ticker == "USDRUB" ? true : 
	  ticker == "USDSEK" ? true : 
	  ticker == "USDZAR" ? true : 
	  false

long_noncom = security("QUANDL:CFTC/"+code+"|1", "D", close) 
short_noncom = security("QUANDL:CFTC/"+code+"|2", "D", close) 
spread = security("QUANDL:CFTC/"+code+"|3", "D", close) 

long = is_inversed ? short_noncom : long_noncom
short = is_inversed ? long_noncom : short_noncom

plot(long, color = green, title="Long")
plot(short, color = red, title="Short")
plot(long-short, color = yellow, title="Net", style=histogram)
plot(spread, color = purple, title="Spread", style=area)
hline(0, color=yellow, linestyle=dashed)
is the indicator still active its not loading
返信
hi, I was wondering if you all could make this script available for grains like wheat and corn. I've tried it on wheat and can't get it to work. I wish I knew more about scripts so I could make it work without having to ask but, no dice. Thanks!
返信
ホーム 株式スクリーナー FXスクリーナー 仮想通貨スクリーナー 経済指標カレンダー 使い方 チャート機能 価格 ハウスルール モデレーター ウェブサイト&ブローカー向けソリューション ウィジェット チャートソリューション ヘルプ 機能リクエスト ブログ&ニュース よくあるご質問 ウィキ ツイッター
プロフィール プロフィール設定 アカウントとお支払い ヘルプ 公開したアイデア フォロワー フォロー中 プライベートメッセージ チャット サインアウト