PureBytes Links
Trading Reference Links
|
We can also find
some interesting trends in our composite indexes by exploring them. The Sector
indexes we created in the previous post all begin with
~i Collect these new index tickers (there should
be 13) and save them in a Watch list (I creatively name mine "Sector
Index's")
<FONT face=Arial
size=2>
Add this code to AA
, select n=1 and the new watch list and explore. When complete click on the
today heading to sort. Those sectors above the Index ticker are outperforming
the group as a whole, these below the ticker are lagging. The colors make it
easy to see the trend. The numbers in the cross column indicate when the sector
crossed the index. By clicking on a previous day columns you can quickly see how
the position of a given sector is moving. You can adjust the look back by
adjusting the number in the RSC line. The possibilities are endless but
hopefully this example can help some of you create ideas of your
own....
Regards,Jayson
Filter<FONT
color=#0000ff>=C<FONT
size=2>>0<FONT
face=Arial color=#0000ff>;
x=<FONT
color=#0000ff>RelStrength(<FONT
size=2>"~index"<FONT face=Arial
color=#0000ff>);
RSC=<FONT
face=Arial>LinRegSlope(x,<FONT
size=2>7<FONT
face=Arial>);
AddColumn<FONT
color=#0000ff>(IIf<FONT
size=2>(rsc>0,<FONT
size=2>BarsSince(rsc<=0<FONT
size=2>),BarsSince(rsc>=<FONT
size=2>0)),"Cross"<FONT
size=2>,1.0<FONT
face=Arial>);
AddColumn<FONT
face=Arial>(RSC,"Today
RSC",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(rsc>Ref(rsc,-<FONT
size=2>1),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(RSC,-1),<FONT
size=2>"Yesterday RSC",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>1)>=Ref<FONT
size=2>(rsc,-2),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(RSC,-2),"2
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>2)>=Ref<FONT
size=2>(rsc,-3),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-3),"3
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>3)>=Ref<FONT
size=2>(rsc,-4),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-4),"4
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>4)>=Ref<FONT
size=2>(rsc,-5),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-5),"5
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>5)>=Ref<FONT
size=2>(rsc,-6),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-6),"6
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>6)>=Ref<FONT
size=2>(rsc,-7),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-7),"7
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>7)>=Ref<FONT
size=2>(rsc,-8),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-8),"8
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>8)>=Ref<FONT
size=2>(rsc,-9),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-9),"9
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>9)>=Ref<FONT
size=2>(rsc,-10),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT face=Arial
color=#0000ff>)));
AddColumn<FONT
face=Arial>(Ref<FONT
size=2>(rsc,-10),"10
days",1.2<FONT
size=2>,colorDefault<FONT
face=Arial>,IIf<FONT
size=2>(RSC==0,<FONT
size=2>colorBlue<FONT
color=#0000ff>,IIf<FONT
size=2>(Ref(rsc,-<FONT
size=2>10)>=Ref<FONT
size=2>(rsc,-11),<FONT
size=2>colorGreen<FONT
color=#0000ff>,<FONT
size=2>colorRed<FONT
face=Arial color=#0000ff>)));
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|