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

[amibroker] Re: Sector information



PureBytes Links

Trading Reference Links

Anthony,

I had the following code for Sector Evaluation. See if it has any application to your own needs. I don't remember where it came from or whether I had anything to do with the code itself.

Phsst

// Market Sector Analysis

SetChartBkColor( colorBlack ) ;
EnableTextOutput( False );
S1 = Foreign( "XLY", "Close" ) ;
S2 = Foreign( "XLK", "Close" ) ;
S3 = Foreign( "XLI", "Close" ) ;
S4 = Foreign( "XLB", "Close" ) ;
S5 = Foreign( "XLE", "Close" ) ;
S6 = Foreign( "XLP", "Close" ) ;
S7 = Foreign( "XLV", "Close" ) ;
S8 = Foreign( "XLU", "Close" ) ;
S9 = Foreign( "XLF", "Close" ) ;

Period = Param( "Indicator Period", 14, 1, 50 );
Plotwhat = ParamList( "Display", "Price|ROC|RSI" );


if ( Plotwhat == "Price" )
{
S11 = S1;
S12 = S2;
S13 = S3;
S14 = S4;
S15 = S5;
S16 = S6;
S17 = S7;
S18 = S8;
S19 = S9;
}
else
if ( Plotwhat == "ROC" )
{
S11 = ROC( S1, Period );
S12 = ROC( S2, Period );
S13 = ROC( S3, Period );
S14 = ROC( S4, Period );
S15 = ROC( S5, Period );
S16 = ROC( S6, Period );
S17 = ROC( S7, Period );
S18 = ROC( S8, Period );
S19 = ROC( S9, Period );
}
else
{
S11 = RSIa( S1, Period );
S12 = RSIa( S2, Period );
S13 = RSIa( S3, Period );
S14 = RSIa( S4, Period );
S15 = RSIa( S5, Period );
S16 = RSIa( S6, Period );
S17 = RSIa( S7, Period );
S18 = RSIa( S8, Period );
S19 = RSIa( S9, Period );
}


Plot( S11, "", colorBlue, 1 );

Plot( S12, "", colorBrightGreen, 1 );
Plot( S13, "", colorWhite, 1 );
Plot( S14, "", colorAqua, 1 );
Plot( S15, "", colorGrey50, 1 );
Plot( S16, "", colorYellow, 1 );
Plot( S17, "", colorCustom12, 1 );
Plot( S18, "", colorLightOrange, 1 );
Plot( S19, "", colorRed, 1 );

Title = "Market Sectors => " + EncodeColor( colorYellow ) +
WriteIf( Plotwhat == "Price", "Close", Plotwhat + "(" + Period
+ ")" ) + "\n" +
EncodeColor( colorBlue ) + " Consumer Disc " + WriteVal( S11,
1.2 ) + "\n" +
EncodeColor( colorBrightGreen ) + " Technology " +
WriteVal( S12, 1.2 ) + "\n" +
EncodeColor( colorWhite ) + " Industrial " +
WriteVal( S13, 1.2 ) + "\n" +
EncodeColor( colorAqua ) + " Materials " + WriteVal
( S14, 1.2 ) + "\n" +
EncodeColor( colorGrey50 ) + " Energy " +
WriteVal( S15, 1.2 ) + "\n" +
EncodeColor( colorYellow ) + " Consumer Staples " + WriteVal(
S16, 1.2 ) + "\n" +
EncodeColor( colorCustom12 ) + " Health Care " + WriteVal
( S17, 1.2 ) + "\n" +
EncodeColor( colorLightOrange ) + " Utilities "
+ WriteVal( S18, 1.2 ) + "\n" +
EncodeColor( colorRed ) + " Financials " + WriteVal(
S19, 1.2 );


--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxx> wrote:
>
> Hello,
> 
> Can anyone provide a website to show sector information...like best performing sector at this time..
> 
> I would like to compare with my composite sector / industry information created in Amibroker..
> 
> Thank you
> Anthony
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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/