[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Briese's COT & Movement Indexes (Help!)



PureBytes Links

Trading Reference Links

Mark,
"The problem is that the formula is tied to the one security. I need 
to be able to page through my securities and have each one render the 
appropriate indicator for that particular security."

Remove the setforeign. Setforeign ties the formula to just that 
security.

IndexN = (Close - LLV(Close,780))/(HHV(Close,780) - LLV(Close,780))
*100;

//Plot(IndexN, "Cot Index (C)", colorRed, styleThick );

Color = IIf(IndexN < Ref(IndexN,-1), colorGreen,colorRed);
//Plot(C,"",1,64);
Plot(IndexN,"IndexN",Color,styleHistogram | styleOwnScale | 
styleThick, maskHistogram  , 2 );

As for the " Briese states that the Movement Index is "simply the 
difference 
between the COT Index and its reading of one or several weeks prior. 
I use six."
You say you have weekly data for COT. If the formula is 

IndexN = (Close - LLV(Close,780))/(HHV(Close,780) - LLV(Close,780))
*100;

Movement_Index = IndexN - roc(IndexN,6);

If you have daily data and you want to plot it weekly,

TimeFrameSet( inweekly ); 
Movement_Index = IndexN - roc(IndexN,6);
TimeFrameRestore(); // restore time frame to original 

John


--- In amibroker@xxxxxxxxxxxxxxx, "markwilson1304" 
<markwilson1304@xxx> wrote:
>
> Can someone please help me with indicator formulas for Steve 
Briese's 
> COT and Movement Indexes (his book, The Commitments of Traders 
> Bible). I download my COT data from Shatterfield.com and have two 
> separate folders that Amibroker accesses for price and COT 
> data; "C:\Metastock Data" (for pricing data), and "C:\MetaStock 
> Data\COT" (for the Commitments of Traders data).
> 
> I am using the Metastock database plugin, so each folder is updated 
> whenever I download daily data; weekly COT data from Shatterfield, 
> and daily price data from Quotes Plus.
> 
> I came up with the below formula and it does render a correct COT 
> Index for one security, Corn; although I would rather it be 
rendered 
> as a histogram (on a scale 100% bullish, 0% bearish), and 
normalized 
> with the centerline at 50%. Shatterfield's COT data is broken into 
3 
> files for each security; "Corn-C" is the Commercials' open 
> interest, "Corn-N" is the Non-Commericials' Open Interest, 
and "Corn-
> S" is for Small, nonreportable traders. Hence, three SetForeign's 
to 
> plot the COT Index indicator in a single pane.
> 
> The problem is that the formula is tied to the one security. I need 
> to be able to page through my securities and have each one render 
the 
> appropriate indicator for that particular security. As it is now, 
> when I page from Corn, say to Copper, the price information changes 
> but the COT Index indicator in the bottom pane still shows the Corn 
> Index indicator.
> 
> In other words, how do I formulate the below COT index formula so 
> that it is global in nature and will reflect each different 
> Security's price chart with the appropriate underlying COT data? 
The 
> hhv/llv lookback is supposed to be 3 years, so I'm not sure "780" 
is 
> correct. I assumed 52 weeks per year x 5 trading days a week x 3 
> years.
> 
> 
> SetForeign("CORN-C");
> IndexN = (Close - LLV(Close,780))/(HHV(Close,780) - LLV(Close,780))
> *100;
> Plot(IndexN, "Cot Index (C)", colorRed, styleThick );
> 
> SetForeign("CORN-N");
> IndexC = (Close - LLV(Close,780))/(HHV(Close,780) - LLV(Close,780))
> *100;
> Plot(IndexC, "Cot Index (N)", colorBlue, styleThick );
> 
> SetForeign("CORN-S");
> IndexS = (Close - LLV(Close,780))/(HHV(Close,780) - LLV(Close,780))
> *100;
> Plot(IndexS, "Cot Index (S)", colorGreen, styleThick );
> 
> Then, if you can help me with that, I need a similar formula to 
chart 
> Briese's Movement Index, which is nothing more than the "rate of 
> change of the COT Index." The lookback period on this is supposed 
to 
> be 6 weeks. The appropriate Metastock formula (I'm making the 
switch 
> to AmiBroker) is: 
> 
> Weeks:=Input("Weeks",3,1000,156);
> 
> Com:=Security("C:\MetaStock Data\COT\CORN-C",C);
> Non:=Security("C:\MetaStock Data\COT\CORN-N",C);
> Sml:=Security("C:\MetaStock Data\COT\CORN-S",C);
> 
> ROC(((com-LLV(com,Weeks))/(HHV(com,Weeks)-LLV(com,Weeks))*100),5,$);
> ROC(((non-LLV(non,Weeks))/(HHV(non,Weeks)-LLV(non,Weeks))*100),5,$);
> ROC(((sml-LLV(sml,Weeks))/(HHV(sml,Weeks)-LLV(sml,Weeks))*100),5,$);
> 
> Briese states that the Movement Index is "simply the difference 
> between the COT Index and its reading of one or several weeks 
prior. 
> I use six."
> 
> If you can help me with this the pertinent information (a pdf file) 
> can be found here: 
> http://markewilson.net2go.com
> 
> Thanks,
> Mark Wilson
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/