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

Re: [amibroker] ATTENTION ! ATTENTION bogus post claiming to be from amibroker at neo.pl


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] attn: optoins players ----- new feature suggestedto AB
  • From: "Tomasz Janeczko" <amibroker@xxxxxx>
  • Date: Mon, 9 Aug 2004 07:48:26 -0700
  • Title: Re: [amibroker] attn: optoins players ----- new feature suggested to AB

PureBytes Links

Trading Reference Links




Hello,
 
You are wrong.
You definitely CAN access day/date/dayofweek in 
array !!!
 
dday = Day();
ddow = DayOfWeek();
 
for( i = 0; i < BarCount; i++ )
{
   // access day in loop :
   something =  dday[ i ] 
;
   somethingelse = ddow[ i 
];
}
 
And you can do what you need also without any 
loops.
 
Instead of:
 
expiry = 
IIf(DayOfWeek()==5 AND Day() > 14  AND Day() < 
22,True,False);
 
Write:
expiry = 
IIf(DayOfWeek()<=5 AND Ref( DayOfWeek() < 2, 1 ) AND Day() > 14 
 AND Day() < 22,True,False);
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Terry 

  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Monday, August 09, 2004 4:03 
  PM
  Subject: Re: [amibroker] attn: optoins 
  players ----- new feature suggestedto AB
  <SPAN 
  >Gary,Thanks for the suggestion, but I cannot 
  make it work. Seems to me this would require recursion which is not allowed 
  with AB functions or it requires a loop for which I cannot find non-array 
  functions such as Day, Date, DayOfWeek.Signed 
  Stumped.--
  <SPAN 
    >Terry, If the trade day is null (ie. 
    doesn't exist, just test for null and assign the alternate expiration 
    date. Regards,GaryTerry 
    <MagicTH@xxxxxxxxxxx> wrote:
    I searched 
      PureBytes archives for a formula to detect options expiration dates...none 
      found. I have the following, but it does not find expiration weeks that do 
      not have a trade on Friday as in April, 2003 (for ^OEX). Any 
      suggestions?<FONT 
      face=Courier>expiry = IIf(DayOfWeek()==5 AND Day() > 14  AND Day() 
      < 
  22,True,False);Check 
  AmiBroker web page at:<A 
  href="">http://www.amibroker.com/Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  


Check AmiBroker web page at:
http://www.amibroker.com/

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.