Lowphat

Commitments of Traders(COT) Major's noncom net (beta) By Lowphat

a charted commitments of traders report
of most majors on one chart.
EUR=red
GBP=blue
CHF=white
CAD=dark green
USD bright green
JPY=yellow
AUD=brown
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?
//@version=2
//Created by Lowphat on 8-14-2016 using Greeny's example as a base
//I wanted to see Major's in the same window

study("COT Majors (by Lowphat) noncom net beta", shorttitle="COT Majors by Lowphat (beta)", precision=0)

is_includeoptions = input(false, type=bool, title="Include Options")
smoothing = input(1, type=integer, title="Smoothing")
nc= security("QUANDL:CFTC/"+"BP"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"BP"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
cd= security("QUANDL:CFTC/"+"CD"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"CD"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
//ne= (security("QUANDL:CFTC/"+"NE"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"NE"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close ))*4
jy= security("QUANDL:CFTC/"+"JY"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"JY"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
ec= security("QUANDL:CFTC/"+"EC"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"EC"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
sf= security("QUANDL:CFTC/"+"SF"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"SF"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
ad= security("QUANDL:CFTC/"+"AD"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"AD"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )
dx= security("QUANDL:CFTC/"+"DX"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|5", "D", close )-security("QUANDL:CFTC/"+"DX"+ (is_includeoptions ? "_FO_L_ALL" : "_F_L_ALL")+"|4", "D", close )

hline(0, color=white, linestyle=dashed)
hline(100000, color=green, linestyle=dashed)
hline(-100000, color=red, linestyle=dashed)

pmap=ema(nc, smoothing)
plot(pmap, color = blue, title="ave", style=line, linewidth=3)

pmap2=ema(cd, smoothing)
plot(pmap2, color = green, title="ave", style=line, linewidth=3)

//pmap3=ema(ne, 5)
//plot(pmap3, color = #FF1CAE, title="ave", style=line, linewidth=3)

pmap4=ema(jy, smoothing)
plot(pmap4, color = yellow, title="ave", style=line, linewidth=3)

pmap5=ema(ec, smoothing)
plot(pmap5, color = red, title="ave", style=line, linewidth=3)

pmap6=ema(sf, smoothing)
plot(pmap6, color = white, title="ave", style=line, linewidth=3)

pmap7=ema(ad, smoothing)
plot(pmap7, color = #a77f00, title="ave", style=line, linewidth=3)

pmap8=ema(dx, smoothing)
plot(pmap8, color = #00FF00, title="ave", style=line, linewidth=3)