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

RE: [amibroker] Re: Dates Question



PureBytes Links

Trading Reference Links









Sorry about that Anthony!  It’s
the effect of those drugs back in the 60’s...  Its not easy living
with all of these voices in my head.. 

 

d

 

<span
>-----Original Message-----
From: Anthony Faragasso
[mailto:ajf1111@xxxxxxxx] 
Sent: Sunday, March 23, 2003 11:28
AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Dates
Question

<span
> 

<span
>Dingo,<font size=2
face="Courier New">

Your &#8220;stream of consciousness&#8221; has
knocked  me Unconscious...:((

Anthony

dingo wrote:

> If you have macro skills you could write one
to emit a separate
> section of code that does just the part with
the dates and then in
> your main formula put in a #Include
&#8220;path/to/file/emitted/by/macro&#8221; or
> if you have a text editor with macro
capabilities that would really
> facilitate the construction.
>
> That would be quite a complicated IIF
statement though but you might
> be able to do it something like:
>
> Buy=IIf(DateNum()==880109,1,0)OR
IIf(DateNum()==911021,1,0);
>
> Buy=Buy Or IIf(DateNum()==yymmdd,1,0) Buy Or
> IIf(DateNum()==yymmdd,1,0);
>
> .
>
> .
>
> .
>
> .
>
> Buy=Buy Or IIf(DateNum()==yymmdd,1,0) Buy Or
> IIf(DateNum()==yymmdd,1,0);
>
> I&#8217;m wondering it this could be done
easier in one of the scripts and
> do the same thing I mentioned in the first
sentence above?  I&#8217;ll try
> to think/find something that would help with
this...  I&#8217;m very busy
> right now but if no one else jumps in
I&#8217;ll try to come up with
> something later....
>
> This msg is sorta &#8220;stream of
consciousness&#8221;  so bear with me:  A
> script could be written to read in a text
file with a format something
> like:  X yyyymmdd  where X would be
a B for buy S for sell.  That
> script would have the filesystem object open
and read in that file and
> then turn on the buy/sell elements of their
respective arrays.
>
> d
>
> -----Original Message-----
> From: steve_almond
[mailto:steve_almond@xxxxxxxxx]
> Sent: Sunday, March 23, 2003 10:26 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Dates Question
>
> Anthony,
>
> This works fine, thankyou. I've converted all
the dates to Datenums,
> however, I have over 75 buy and 75 sell
signals to include in this
> code (listed in Excel). Is there any
shorthand way to include so many
> Datenums?
>
> Steve
>
> --- In amibroker@xxxxxxxxxxxxxxx,
"Anthony Faragasso" <ajf1111@xxxx>
> wrote:
> > Steve,
> >
> > Try this: under settings tab...set
delays to 0, positions to long
> only.
> >
> > Buy=IIf(DateNum()==880109,1,0)OR
IIf(DateNum()==911021,1,0);
> > Sell=IIf(DateNum()==890612,1,0)OR
IIf(DateNum()==921201,1,0);
> >
> > Filter=1;
> > AddColumn(Buy,"B");
> > AddColumn(Sell,"S");
> >
> >
> > -------Original Message-------
> >
> > From: amibroker@xxxxxxxxxxxxxxx
> > Date: Sunday, March 23, 2003 04:25:17
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Dates Question
> >
> > I've looked in the help files for this,
but my programming skilla
> are
> > not good enough to solve this:
> >
> > I want to backtest a series of Buy/Sell
signals given on a website
> > (the actual method of deriving the
signals is unknown). So, I want
> to
> > tell AB (for the current ticker:
> >
> > Buy on 9/01/1988
> > Sell on 12/06/1989
> > Buy on 21/10/1991
> > Sell on 1/12/1992
> >
> > Etc.
> >
> > Can anyone help to code this?
> >
> > Thanks,
> >
> > Steve
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> >
-----------------------------------------
> > 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
> >
> > Your use of Yahoo! Groups is subject to
the Yahoo! Terms of Service.
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send 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
>
> Your use of Yahoo! Groups is subject to the
Yahoo! Terms of Service.
>
>
>                   
Yahoo! Groups Sponsor
                       
ADVERTISEMENT


>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send 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
>
> Your use of Yahoo! Groups is subject to the
Yahoo! Terms of Service.





<font size=2
face="Courier New">Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<span
>
Send 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


Your use of
Yahoo! Groups is subject to the Yahoo!
Terms of Service. 










Yahoo! Groups Sponsor


  ADVERTISEMENT









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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.