I'm having problems with the following code. It's supposed to chart the
relative strength of the base index, compared to the sp-500. Even
though the baseindex that I assigned to the subindustries are the same,
by RS line is different. I'm using tc2000 data and the problematic
subindustry groups are MG711 and MG716. Could somebody please help?
TIA
// Weekly Relative strength
_SECTION_BEGIN("Weekly Relative Strength of Sector vs. SP-500");
sector=GetBaseIndex();
SetForeign(sector);
//OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
//define trend of overall market
TimeFrameSet(inWeekly);
marketrs1=RelStrength("sp-500");
lmarketup1=EMA(marketrs1,50);
smarketup1=EMA(marketrs1,10);
cry0rs=RelStrength("cry0");
lcommup=EMA(cry0rs,50);
scommup=EMA(cry0rs,10);
RestorePriceArrays();
Plot(MArketrs1,"Sector Relative Strength vs.
Sp-500",colorGreen,styleLine);
Plot(Lmarketup1,"EMA 40",colorRed,styleThick);
Plot(smarketup1,"EMA 10",colorBlue,styleThick);
_SECTION_END();