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

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



PureBytes Links

Trading Reference Links

Oliver,

Much shorter code ===>

// Code begins
ticker1 = "MSFT";
ticker2 = "CSCO";
Title =   "Plot of "
        + EncodeColor(29) + ticker1
        + " and "
        + Encodecolor(32) + ticker2;
Plot(Foreign(ticker1,"C"), "", 29, styleLine);
Plot(Foreign(ticker2,"C"), "", 32, styleLine);
// Code ends

Regards,
- Salil V Gangal

--- In amibroker@xxxxxxxxxxxxxxx, Salil V Gangal <salil_gangal@xxxx> 
wrote:
> 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 Gangal
> 
> olivier_molongo <olivier_molongo@xxxx> wrote:
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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 SponsorADVERTISEMENT
> 
> 
> ---------------------------------
> 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. 
> 
> 
> 		
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 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:
     http://docs.yahoo.com/info/terms/