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

[amibroker] Re: Daily Index Filter within a Weekly System



PureBytes Links

Trading Reference Links




Jason,
 
Here is another way:
 

//Year to date %change
Newyear = Year();
startValue=ValueWhen<FONT 
size=2>(Year<FONT 
size=2>()<Ref<FONT 
size=2>(Year<FONT 
size=2>(),1) 
,Close,1);
EndValue1 = ValueWhen( 
Newyear, Close, 1<FONT 
size=2>);
 
Title="YTD 
change"+<FONT 
face="Courier New" color=#ff00ff size=2>" ( "<FONT face="Courier New" 
size=2>+WriteVal<FONT 
size=2>(100*( 
EndValue1 - StartValue )/StartValue,<FONT color=#ff00ff 
size=2>1.2)<FONT face="Courier New" 
size=2>+" 
%" +<FONT 
face="Courier New" color=#ff00ff size=2>" )"<FONT 
size=2>;
 
Anthony
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Jason 
  Hart 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Thursday, February 05, 2004 5:15 
  PM
  Subject: Re: [amibroker] datenum() 
  function
  
  Jayson, Ara - Thanks, I appreciate the help.
  If anyone is interested I put in a YTD% return in the upper right hand 
  corner on one of my chart templates:
   
  
  b = 1031231;
  a=DateNum()==b;
  i=ValueWhen<FONT 
  size=1>(a,C);
  ii = ((C-i)/i)*100<FONT 
  size=1>;
  Title = Name() + 
  " - " + <FONT 
  color=#0000ff size=1>WriteVal( <FONT color=#0000ff 
  size=1>DateTime(), formatDateTime ) + <FONT 
  color=#ff00ff size=1>" - " + <FONT color=#ff00ff 
  size=1>" Open: " + O + <FONT color=#ff00ff 
  size=1>", Hi: " + H + <FONT color=#ff00ff 
  size=1>", Low: " + L + <FONT color=#ff00ff 
  size=1>", Close: " + C + <FONT color=#ff00ff 
  size=1>" " + <FONT color=#0000ff 
  size=1>NumToStr(a,<FONT color=#ff00ff 
  size=1>1.2) + <FONT color=#ff00ff 
  size=1>"%" + ", Volume: 
  " + Writeb = <FONT face="Courier New" color=#0000ff 
  size=1>WriteVal<FONT 
  size=1>(V,1)+ 
  " " + <FONT 
  color=#0000ff size=1>EncodeColor( colorYellow) 
  +" YTD % change: " + 
  NumToStr(ii,<FONT 
  color=#ff00ff size=1>1.2) + <FONT color=#ff00ff 
  size=1>"%" ; 
  Ara Kaloustian <ara1@xxxxxxxxxx> wrote:
  <BLOCKQUOTE class=replbq 
  >
    
    

    Valuewhen(DateNUM()==x,Close,1);
    <BLOCKQUOTE 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      <A title=jcasavant@xxxxxxxxxxx 
      href="">Jayson 
      To: <A 
      title=amibroker@xxxxxxxxxxxxxxx 
      href="">amibroker@xxxxxxxxxxxxxxx 
      
      Sent: Thursday, February 05, 2004 
      8:18 AM
      Subject: RE: [amibroker] datenum() 
      function
      
      <FONT face=Arial color=#0000ff 
      size=2>Jason,
      <FONT face=Arial color=#0000ff 
      size=2>how about valuewhen()?
      <FONT face=Arial color=#0000ff 
      size=2>i=valuewhen(a,c);
       
      Regards, 
      Jayson 
      <FONT face=Tahoma 
      size=2>-----Original Message-----From: Jason Hart 
      [mailto:jhart_1972@xxxxxxxxx]Sent: Thursday, February 05, 2004 
      10:48 AMTo: <A 
      href="">amibroker@xxxxxxxxxxxxxxxSubject: 
      RE: [amibroker] datenum() function
      any idea how I would configure this so that it returns the close from 
      12/31?  I thought it was going to be easy but I've hit a 
      roadblock!  I gave this a shot .....no luck though
       
      
      b = <FONT 
      color=#ff00ff>1031231;
      a=DateNum<FONT 
      face="Courier New">()==b;
      r= Ref(C,a);
       
      Jason Jayson <jcasavant@xxxxxxxxxxx> 
      wrote:
      <BLOCKQUOTE class=replbq 
      >
        
        <FONT face=Arial 
        color=#0000ff>Jason,
        <FONT face=Arial 
        color=#0000ff>try.....
        <FONT face=Arial 
        color=#0000ff> 
        <FONT face=Arial 
        color=#0000ff> a=datenum()==b;
         
        Regards, 
        Jayson 
        <FONT 
        face=Tahoma>-----Original Message-----From: Jason Hart 
        [mailto:jhart_1972@xxxxxxxxx]Sent: Thursday, February 05, 
        2004 9:31 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
        [amibroker] datenum() function
        
        <BLOCKQUOTE class=replbq 
        >
          I'm trying to incorporate a chart that marks the date 
          12/31/03.  How do I let the datenum() function know which date 
          I'm after?  The only luck I've had so far is returning the 
          most recent date.  I've tried this but no luck
          b = <FONT 
          color=#ff00ff>1031231;
          a = <FONT 
          face="Times New Roman"><FONT 
          color=#0000ff>DateNum(b);
          Jason  
        
        
        Do you Yahoo!?Yahoo! Finance: <A 
        href="">Get 
        your refund fast by filing online 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@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 
        
      
      
      Do you Yahoo!?Yahoo! Finance: <A 
      href="">Get 
      your refund fast by filing online 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@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@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 
      
  
  
  Do you Yahoo!?Yahoo! Finance: <A 
  href="">Get 
  your refund fast by filing online 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.