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

[amibroker] Re: get single day data from Close?



PureBytes Links

Trading Reference Links

IIF together with range selection solves my problem. Lastvalue doesn't work because of the reason Graham mentioned.

Thanks for everyone's reply.



--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> Remove your IF and replace with IIF
> Chances are your script would work better with iif anyway and be far
> more flexible
> If you absolutely must use IF then do it with a for loop through the
> bars, and give your self a chance at flexibility to scan whatever day
> you want
> To give a proper repsonse to a question that has only given part
> information (remember that what is posted is assumed to be the total
> information), we need to see your entire code, otherwise we go through
> many posts becasue of "Yes But"
> 
> -- 
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
> 
> 2009/4/10 conrad_faber <cfaber@xxx>:
> > Again, your range restrictions should work.
> > But try:
> > Filter=DateNum()==1090403;
> > AddColumn( Close, "Close" );
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "H L" <hulu800@> wrote:
> >>
> >> I need to clarify my question: The AFL script need to be run in EXPLORATION mode, not the scan mode in my previous post.
> >>
> >> So I don't think I can use "Buy=DateNum()==1090403;"
> >>
> >> If I use "Last = C;" then Last is an array instead of scalar. This would prevent me from using Last in IF-statements, which requires numeric or boolean type.
> >>
> >> Any other suggestions?
> >>
> >>
> >>
> >> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >> >
> >> > Lastvalue gives the last value in your database for that symbol
> >> > Just Use Last = C;
> >> >
> >> > --
> >> > Cheers
> >> > Graham Kav
> >> > AFL Writing Service
> >> > http://www.aflwriting.com
> >> >
> >> >
> >> >
> >> > 2009/4/10 conrad_faber <cfaber@>:
> >> > > Range from/to date restrictions work fine on my side. What you could do is to set Range to all quotations and extract using Buy=DateNum()==1090403;
> >> > >
> >> > >
> >> > > --- In amibroker@xxxxxxxxxxxxxxx, "H L" <hulu800@> wrote:
> >> > >>
> >> > >> This may be a really simple question. I want to run a scan on a certain day (e.g., 3/4/2009) using that day's close data, so I set the Range in Automatic Analysis as "from 3/4/2009 to 3/4/2009", in the AFL script I used Last=LastValue(Close) to try to get the close price on 3/4/2009, but it actually returned today's close price.
> >> > >>
> >> > >> So my question is: how to extract the data on a specific date from Close or other array-type price data?
> >> > >>
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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