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

[amibroker] Off topic (Finally a decent search tool for Outlook)



PureBytes Links

Trading Reference Links


Oliver,
 
Use the following code in the IB of AmiBroker.  Use the tickers of stocks you want to plot instead of MSFT / CSCO.
 

// Code begins

ticker1 = "MSFT"; color1 = "red";
ticker2 = "CSCO"; color2 = "blue";
stock1 = Foreign(ticker1,"C");
stock2 = Foreign(ticker2,"C");
Title = "Plot of ";
function getColorNumber( inColor )
{
    colorToNumber = "red,29,green,27,yellow,42,pink,40,violet,38,blue,32,white,55,black,16";
    colorNumber = 47;
    for( colorIndex = 0;
      (color = StrExtract(colorToNumber, colorIndex)) != "";
      colorIndex = colorIndex + 2
    ) {
        if ( color == inColor ) {
            colorNumber = StrToNum(StrExtract(colorToNumber, colorIndex+1));
        }
    }
    return colorNumber;
}
 
Plot(stock1, "", colorRed, styleLine);
Title = Title + Encodecolor(getColorNumber(color1)) + " " + ticker1;
Plot(stock2, ticker2 + " ", colorBlue, styleLine);
Title = Title + Encodecolor(getColorNumber(color2)) + " " + ticker2;

// Code ends
 
Regards,
- Salil V Gangalolivier_molongo <olivier_molongo@xxxxxxxxx> wrote:
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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 
		Do you Yahoo!?SBC Yahoo! - Internet access at a great low price.


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.