Hey guys.
The other day I posted a thread about a Commitment of Traders Indicator I'd been working on, hoping for some help with it.
I got a fair few responses, and after a fair bit of hacking at it, it works!
So here it is for your own personal use. A very simple yet powerful COT indicator.
Now a few notes
1) If you lose money with this its your own fault. I do not accept any responsibility for any losses.
2) I am a crap coder. I really am. Many coders will look at this and notice how cumbersome the mechanics of the indicator are. Tough.
Its the best I can do. If you can improve it you're more than welcome to and I won't ask for any credit or anything.
3) Credits go to Larry Williams for his work on COT and Fibollinger who designed the script I based this on. All I did was change a couple of things around. You can read about Fibollinger's work here http://moneyunleashed.com/articles/i...-metatrader-4/
4) If it doesn't work for you, tough. I'm not tech support. The instructions are below. The mt4 demo platform I'm using to test it is GoMarkets. I've heard different broker's mt4's won't do certain things (just a rumour) so if it helps, thats the broker that works for me. (No comments about their actual brokerage though).
5) You will need to understand how the COT works to be able to understand the below. Larry Williams has some good stuff (no I don't work for him)
----------------------------------------------------------------------------------------------------------------------------------
Instructions
The indicator works similar to the one found on timingcharts.com . It computes the following formula
All this does is assess this weeks net position for a group of traders on a relative scale (3 year scale).
The data we use is from the COT report, published by the CFTC every friday. You can download it here http://www.cftc.gov/MarketReports/Co...ssed/index.htm
The CFTC reports on the positions of the commercials, noncommercials and speculators in the market
Now to get the data into mt4, we'll have to do a little conversion. (you'll need microsoft excel, I'm not sure if this will work with google spreadsheets or openoffice)
Your excel spreadsheet, will need to have Column A with the dates of your COT data and Column B with the COT data itself (e.g. net postion for each date for say the commercials). I've attached an example of this excel file below so you can see what I mean.
Once you have it in this format, you'll need to save it as a tab delimited text file. An example is attached.
You'll have to do this for all 9 files (since you'll have an index calculation each for the commercials, non commercials and speculators)
Each file needs to have the appropriate name or the index won't work.
net commercial position - > save as -> commercial
max commercial net position -> save as -> maxcom
min commercial net position -> save as -> mincom
net noncommercial position -> save as -> noncommercial
max noncommercial net position -> save as -> maxnoncom
min noncommercial net position -> save as -> minnoncom
net nonreporting net position -> save as -> nonreporting
max nonreporting net position -> save as -> maxnonrep
min nonreporting net position -> save as -> minnonrep
Save each file to experts -> files.
Once this is done, you're ready to load the indicator in mt4. Save the indicator below in custom indicators, or open in in metaeditor and compile it.
You'll notice when using it for when your file runs out of data the indicator reverts to a value of 50. This is intentional for 2 reasons.
1) I can't have it revert to 0, those of you who understand COT index's will know, having a value of 0 is very very bearish. 50 is neutral and means nothing.
2) I can't honestly code it to do no value. If I try its likely my coding skills are so bad that nothing will be interpretted as 0. Thus giving a bearish signal.
Cheers,
Scotty
The other day I posted a thread about a Commitment of Traders Indicator I'd been working on, hoping for some help with it.
I got a fair few responses, and after a fair bit of hacking at it, it works!
So here it is for your own personal use. A very simple yet powerful COT indicator.
Now a few notes
1) If you lose money with this its your own fault. I do not accept any responsibility for any losses.
2) I am a crap coder. I really am. Many coders will look at this and notice how cumbersome the mechanics of the indicator are. Tough.
Its the best I can do. If you can improve it you're more than welcome to and I won't ask for any credit or anything.
3) Credits go to Larry Williams for his work on COT and Fibollinger who designed the script I based this on. All I did was change a couple of things around. You can read about Fibollinger's work here http://moneyunleashed.com/articles/i...-metatrader-4/
4) If it doesn't work for you, tough. I'm not tech support. The instructions are below. The mt4 demo platform I'm using to test it is GoMarkets. I've heard different broker's mt4's won't do certain things (just a rumour) so if it helps, thats the broker that works for me. (No comments about their actual brokerage though).
5) You will need to understand how the COT works to be able to understand the below. Larry Williams has some good stuff (no I don't work for him)
----------------------------------------------------------------------------------------------------------------------------------
Instructions
The indicator works similar to the one found on timingcharts.com . It computes the following formula
QuoteDisliked(X-B)/(A-B)
where
X = net position
A = maximum net position for the last 156 weeks (3 years)
B = minimum net position for the last 156 weeks (3 years)
All this does is assess this weeks net position for a group of traders on a relative scale (3 year scale).
The data we use is from the COT report, published by the CFTC every friday. You can download it here http://www.cftc.gov/MarketReports/Co...ssed/index.htm
The CFTC reports on the positions of the commercials, noncommercials and speculators in the market
Now to get the data into mt4, we'll have to do a little conversion. (you'll need microsoft excel, I'm not sure if this will work with google spreadsheets or openoffice)
Your excel spreadsheet, will need to have Column A with the dates of your COT data and Column B with the COT data itself (e.g. net postion for each date for say the commercials). I've attached an example of this excel file below so you can see what I mean.
Once you have it in this format, you'll need to save it as a tab delimited text file. An example is attached.
You'll have to do this for all 9 files (since you'll have an index calculation each for the commercials, non commercials and speculators)
Each file needs to have the appropriate name or the index won't work.
net commercial position - > save as -> commercial
max commercial net position -> save as -> maxcom
min commercial net position -> save as -> mincom
net noncommercial position -> save as -> noncommercial
max noncommercial net position -> save as -> maxnoncom
min noncommercial net position -> save as -> minnoncom
net nonreporting net position -> save as -> nonreporting
max nonreporting net position -> save as -> maxnonrep
min nonreporting net position -> save as -> minnonrep
Save each file to experts -> files.
Once this is done, you're ready to load the indicator in mt4. Save the indicator below in custom indicators, or open in in metaeditor and compile it.
You'll notice when using it for when your file runs out of data the indicator reverts to a value of 50. This is intentional for 2 reasons.
1) I can't have it revert to 0, those of you who understand COT index's will know, having a value of 0 is very very bearish. 50 is neutral and means nothing.
2) I can't honestly code it to do no value. If I try its likely my coding skills are so bad that nothing will be interpretted as 0. Thus giving a bearish signal.
Cheers,
Scotty
Attached File(s)
commercial.txt
< 1 KB
|
1,246 downloads
netcoms.xls
32 KB
|
1,399 downloads
COMDEX INTEGRATED.mq4
7 KB
|
1,628 downloads