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
Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//@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)