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

RE: [amibroker] Industry voerlay as a line chart



PureBytes Links

Trading Reference Links

Dennis,

 

I had a similar issue except that I wanted to add the Industry and Sector information to the title.  This includes the Industry and Sector name, and the Industry’s ROC over several periods.  Code is below. 

 

FYI, my chart background is black.  Change colors to taste.

 

Regards,

 

Dan.

 

 

// Get industry close

IndClose                = Foreign( GetBaseIndex(), "close" );

 

// Get Title Values

PctChangePriorDay       = ((IndClose - Ref(IndClose, -1))/IndClose) * 100;

PctChangePriorWeek      = ((IndClose - Ref(IndClose, -5))/IndClose) * 100;

PctChangePriorMonth     = ((IndClose - Ref(IndClose, -22))/IndClose) * 100;

PctChangePriorQuarter   = ((IndClose - Ref(IndClose, -65))/IndClose) * 100;

PctChangePriorYear      = ((IndClose - Ref(IndClose, -250))/IndClose) * 100;

 

// Set Title

Title = Title 

        +  EncodeColor(colorWhite)

        + "\nSect:  " + SectorID(mode = 1)

        + "\nInd:    "IndustryID( mode = 1 )

        + "\n"" Ind Change(%):  "

        + "\n" + "   Day:  "

                +  WriteIf(PctChangePriorDay > 0

                          , EncodeColor(colorBrightGreen) + NumToStr( PctChangePriorDay, 1 )

                          , EncodeColor(colorRed ) + NumToStr( PctChangePriorDay, 1 )

                          )    

        + "\n" + EncodeColor(colorWhite) + "   Week:  "

                +  WriteIf(PctChangePriorWeek> 0

                          , EncodeColor(colorBrightGreen) + NumToStr( PctChangePriorWeek, 1 )

                          , EncodeColor(colorRed ) + NumToStr( PctChangePriorWeek, 1 )

                          )

        + "\n" + EncodeColor(colorWhite) + "   Month:  "

                +  WriteIf(PctChangePriorMonth> 0

                          , EncodeColor(colorBrightGreen) + NumToStr( PctChangePriorMonth, 1 )

                          , EncodeColor(colorRed ) + NumToStr( PctChangePriorMonth, 1 )

                          )    

        + "\n" + EncodeColor(colorWhite) + "   Qtr:  "

                +  WriteIf(PctChangePriorQuarter> 0

                          , EncodeColor(colorBrightGreen) + NumToStr( PctChangePriorQuarter, 1 )

                          , EncodeColor(colorRed ) + NumToStr( PctChangePriorQuarter, 1 )

                          )    

        + "\n" + EncodeColor(colorWhite) + "   Year:  "

                +  WriteIf(PctChangePriorYear  > 0

                          , EncodeColor(colorBrightGreen) + NumToStr( PctChangePriorYear, 1 )

                          , EncodeColor(colorRed ) + NumToStr( PctChangePriorYear, 1 )

                          )    

        ;                

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dennis And Lisa
Sent: Tuesday, June 07, 2005 2:56 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Industry voerlay as a line chart

 

Is there a way to overlay a stocks industry over it's respective price
chart, and have that Industry change everytime a stock changes?

thankx
dennis





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






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