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

RE: [amibroker] Re: Dates Question



PureBytes Links

Trading Reference Links

I have not tried this particular example, but I have installed many
repetitive commands in a VB script by using the CONCATENATE command in
excel.

If Col A holds the ticker
And Col B holds a constant

Then this is the concatenate statement, with the & being the concatenate
operator.

="Case "&""""&A1&""""&" Trigger = "&B1

That produces this result

Case "ADBE" Trigger = 32

[Note: the quadruple " marks are needed to embed quote marks.]

I needed a whole bunch of Case statements, one for each ticker and
Trigger level, thus perhaps the same approach could be used to convert
dates in Excel into the proper IIf(DateNum....statement.  After they are
rendered within Excel, they can be copy/pasted into the AFL editor.

Hope this idea helps,

Ken

-----Original Message-----
From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx] 
Sent: Sunday, March 23, 2003 10:34 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Dates Question

Steve,

To have the system fire ( Buy or Sell )  on the specific Dates as you
describe...I do not see any other alternative except to insert the dates
manually....

Maybe someone else has a suggestion.

Anthony

steve_almond wrote:

>  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: 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.
>
>
>
>                    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.



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





------------------------ Yahoo! Groups Sponsor ---------------------~-->
Your own Online Store Selling our Overstock.
http://us.click.yahoo.com/rZll0B/4ftFAA/46VHAA/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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/