ChrisMoody

_CM_COT Commercial Net Interest_V1

1554 10 305
Overview.
-This is the Beginning of a Educational Series from Jake Bernstein to the TradingView Community.
-Many Traders use the COT Data Incorrectly.
-Jake Discovered if You Look at the Net Commercials and Take Note When Commercials net Buying is Either At All Time Highs, Or Net Buying = Longest Period of Buying Look for an Extreme Move To the Upside.
-In The Future We Will Show Precise Entry Signals…But a Basic Entry Signal Is When Commercials Go From Net Long to Net Short.
-Full Credit in Methodology goes to Jake Bernstein at www.Trade-Futures.com and www.2Chimps.net

Thought Process:
-Commercials Represent Large (Typically Billion Dollar) Companies.
-Take Note - When Commercials Are Buying at Record High
-Take Note - When Commercials Are Buying For Record Long Periods of Time
***Note…Commercials Can Buy For Extended Periods Dollar Cost Averaging…
***Basic Entry Listed In Overview.
***More Precise Entries Will Be Introduced Soon.

Indicator Shows Net Commercials
-Full Credit goes to Greeny for Creating Original Code. I only made slight modifications.

Modifications include
-Took Off Net Long and Short Individual Plots
-Added Optional Background Highlighting when Commercials Switch from Long to Short
-Added Optional Alert Capability If Commercials Go From Net Long to Short
-Ability to Show INVERSE - This makes it Easier for some Traders to See…Since the Signals look similar to MacD/RSI Type Indicators.

***Additional Indicators and Updates Coming Soon

***Link To Upper Indicator:
_CM_COT Commercial Net Interest_Upper_V1
Remove from Favorite Scripts Add to Favorite Scripts
//Created by ChrisMoody on 3-30-2015
//Shows Net Commercials
//Full Credit goes to Greeny fo rcreating original code.  I only made slight modifications.
//Modifications include - Taking away Net Longs and Shorts, Adding Background Highlighting when Commercials go from Long to Short
//Methodology Is from Jake Bernstein at www.Trade-Futures.com and www.2Chimps.net

study("_CM_COT Commercial Net Interest_V1", shorttitle="_CM_COT Commercial Net Int_V1", precision=0)
force_root = input("", title="Override Product")
is_includeoptions = input(false, type=bool, title="Include Options")
si = input(false, type=bool, title="Show Inverse")
sbc = input(false, type=bool, title="Color Price Bars?")
sbg = input(true, type=bool, title="Show Background Highlight when Commercials Change From Buying to Selling?")
sa1 = input(true, type=bool, title="Alert If Commercials Change From Buying to Selling?")

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_L_ALL" : "_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_total = security("QUANDL:CFTC/"+code+"|4", "W", close)
short_total = security("QUANDL:CFTC/"+code+"|5", "W", close)
//Code for Commercials Net Totals
long = is_inversed ? short_total : long_total
short = is_inversed ? long_total : short_total
net = long - short
//Alert criteria
alert1 = net[1] > 0 and net < 0 ? 1 : 0
//Code for Histogram Color
col= net > 0 ? green : red

plot(si and long-short ? (long-short)*-1 : long-short, color = col, title="Net", style=columns)
hline(0, color=black, linestyle=dashed)
barcolor(sbc and (net[1] > 0 and net < 0) ? orange : na)
bgcolor(sbg and (net[1] > 0 and net < 0) ? lime : na, transp=20)

plot(sa1 and alert1 ? alert1 : 0, title="Alert If Commercials Go From Net Buy to Sell", style=line, linewidth=2, color=lime)
IlyasShaikh
2 years ago
Congrats !!!
Reply
jlasenby
2 years ago
Thanks
Reply
LazyBear PRO
2 years ago
Great! Thanks for starting this Chris, can't wait to see your next post on this series :)
Reply
***Link To Upper Indicator:
_CM_COT Commercial Net Interest_Upper_V1

Reply
Euro Rallies Almost Every Time Commercials Go Net Short...Sometimes Short Term Rally...Some are Significant Rallies!!

More Thought Process To Come.

snapshot
+1 Reply
Justiceisfalse
2 years ago
What a great tool. I usually have to look at lesser version of the COT on Fridays. Thanks!
Reply
ucsgears PRO
2 years ago
Nice work, Chris, quickly, fxroot =
ticker == "USDCAD" ? "CD" :
ticker == "USDCAD" ? "CD" :

The USDCAD is listed twice, not that its going to change anything... Just for your attention.
Reply
cristian.d
a year ago
Hi Chris, Is it possible to use stocks with it, to include let's say AAPL in the script lines? I apologize if its a silly request
Reply
ChrisMoody PRO cristian.d
a year ago
No. There is only COT data on futures. The script above just allows you to use Forex symbols based on currency futures. There is no way to know what the data is for single stocks...it's not reported.
Reply
Algyros PRO ChrisMoody
a year ago
Once again, many thanks.
Is the above script only useful for currency futures, or would it also be applicable to equity futures (i.e., ES, NQ, etc.)?
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out