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

[amibroker] Re: Need to 'break'



PureBytes Links

Trading Reference Links




Thanks 
for your code Salil, nice to play with :-) here is a slight modification of your 
code to plot normalized charts for a small watchlist:
<SPAN 
class=703300200-16052004> 

  // 
  Chart display similar to FTbarvisible = 
  Status("barvisible");firstBarVisible = barvisible AND NOT Ref( barvisible, 
  -1 );global ChartColor;
   
  <SPAN 
  class=703300200-16052004>function PlotNormalizedTicker( 
  Ticker)    {    
  array2=Foreign(ticker,"C");    
  scaledArray2=100*(array2/ValueWhen(firstBarVisible,array2)-1);    
  Plot(scaledArray2,"\n"+Ticker,ChartColor++,4);    
  }
   
  list 
  = GetCategorySymbols( categoryWatchlist, 6);ChartColor=1;for( n=0; 
  (Ticker=StrExtract( List, n))!= ""; n++) PlotNormalizedTicker( 
  Ticker); 
<SPAN 
class=703300200-16052004>herman
 

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Salil V Gangal 
  [mailto:salil_gangal@xxxxxxxxx]Sent: Saturday, May 15, 2004 7:41 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
  Performance Charts
  
  Sam,
   
  Perhaps following will help. This code is for AmiBroker's 
  IB.  Copy-n-paste the code block of 2nd ticker multiple times per 
  your needs to put additional tickers.  Also, use tickers you 
  need in place of "MSFT", "YHOO".
  
  // Chart display similar to FT<FONT 
  face="Courier New">
  
  barvisible = Status(<FONT 
  color=#ff00ff>"barvisible");
  firstBarVisible = barvisible AND NOT <FONT 
  color=#0000ff>Ref( barvisible, -1 
  );
   
  // code block for 1st ticker
  
  ticker = "MSFT";<FONT 
  size=1>
  array1=Foreign(ticker,<FONT 
  color=#ff00ff>"C");
  scaledArray1=100*(array1/<FONT 
  color=#0000ff>ValueWhen(firstBarVisible,array1)-<FONT 
  color=#ff00ff>1);
  Plot(scaledArray1,<FONT 
  color=#ff00ff>"",colorBlue,<FONT 
  color=#ff00ff>4);
  Title = <FONT 
  color=#0000ff>EncodeColor(colorBlue) + <FONT 
  face="Courier New">ticker + " 
  ";
   
  // code block for <FONT 
  face="Courier New" color=#008000>2nd 
  ticker
  ticker = "<FONT face="Courier New" 
  color=#ff00ff>YHOO";
  array2=Foreign(ticker,<FONT 
  color=#ff00ff>"C");
  scaledArray2=100*(array2/<FONT 
  color=#0000ff>ValueWhen(firstBarVisible,array2)-<FONT 
  color=#ff00ff>1);
  Plot(scaledArray2,<FONT 
  color=#ff00ff>"",colorRed,<FONT 
  color=#ff00ff>4);
  Title = Title + <FONT 
  color=#0000ff>EncodeColor(colorRed) + <FONT 
  face="Courier New">ticker + "<FONT 
  face="Courier New" color=#ff00ff> <FONT 
  color=#ff00ff>";
   
  Regards,
  - Salil V 
  Gangal
   
  --- Sam Levy <slevy1220@xxxxxxxxxxxxx> wrote: > Has 
  anyone used Amibroker to construct "performance charts" similar > to 
  those available at the following link? > > 
  http://stockcharts.com/charts/performance/ > > If so, would 
  appreciate a suggestion on how to construct afl code. > Thanks > 
  > 
  
  
  Do you Yahoo!?<A 
  href="">SBC 
  Yahoo! - Internet access at a great low price. Send BUG 
  REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


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.