PureBytes Links
Trading Reference Links
|
Thank you! I will gve it a try.
--- In amibroker@xxxxxxxxxxxxxxx, Jason Hart <jayhart_1972@xxxx>
wrote:
>
> Try this - Adjust the time period to what you are looking for
>
> Jason
>
>
>
> // Exploration to create
>
> //Correlation matrix
>
> // Be sure to set
>
> //"Apply to" to desired wishlist Name
>
> // Also, change the
>
> //watchlist number ("2" in example below) to the correct number
>
> //(zero based).
>
>
>
> Buy=Sell=Short=Cover=0;
>
>
>
> Filter = C > .01;
>
>
>
> AddTextColumn(FullName(),"Ticker",1.0);
>
> list =
>
> GetCategorySymbols(
>
> categoryWatchlist,
>
> 5);
>
> for(
>
> NumTickers=0; NumTickers < 99 AND StrExtract(
>
> list, NumTickers ) !=
>
> "";
>
> NumTickers++ );
>
>
>
>
>
> for(
>
> Col=0;
>
> Col<NumTickers; Col++)
>
> {
>
> Ticker1 =
>
> Name();
>
> Ticker2 =
>
> StrExtract( list, Col);
>
> Var1 =
>
> ROC(Foreign(Ticker1, "C"), 1);
>
>
>
>
>
> Var2 =
>
> ROC(Foreign(Ticker2,"C"),1);
>
>
>
> Test =
>
> Correlation( Var1, Var2,
>
> 180 );
>
> Color =
>
> IIf(Test>.45,
>
> colorBrightGreen,
>
> IIf(Test<0,
>
> colorRed,
>
> colorYellow));
>
> Color =
>
> IIf(Ticker1==Ticker2,
>
> 1, Color);
>
>
>
> AddColumn( Test,
>
> Ticker2, 1.3,
>
> 1, Color);
>
> }
>
>
> jeremy7827110028 <jberkovits1@xxxx> wrote:I have a watch list
with 5 stocks. I am trying to code a correlation
> matrix that reports the correlation for each pair for the last 10,
30,
> 90, and 252 bars. I am new to AmiBroker and have no clue on how to
> approach this one. Any help would be greatly appreciated.
>
> Regards,
>
> Jeremy
>
>
>
>
>
> 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
> Visit your group "amibroker" on the web.
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> ---------------------------------
>
>
>
>
>
> ---------------------------------
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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 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/
<*> 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/
|