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

[amibroker] Re: lastvalue and N last quotations



PureBytes Links

Trading Reference Links

A Beauty Graham! Thanks for that!

As in those 5 days of exploration  several instances of Buy ==1 can occur for a given symbol. These will all show in the AA window on their respective date.  

It would be perfect to filter out these excessive signal. Using the following Filter = ExRemSpan( Buy, 4) ;

This works, only a few valid results(symbols) go missing!

Any ideas on this, or is there a better way to do this?

Thanks,

Adrian



--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> try this
> 
> if( lastvalue( sum( buy,5)  )  )   CategoryAddSymbol( "",
> categoryWatchlist, 58 );
> 
> 
> -- 
> Cheers
> Graham Kav
> AFL Writing Service
> http://www.aflwriting.com
> 
> 
> 
> 
> 2009/7/26 tayamaan <tayamaan@xxx>:
> > Hello all, by coincidence I was working on the same issue and can't seem to get my head around it why this doesn't work.
> >
> > This is what I do:
> >
> > Simple buy statement:
> >
> > Buy = Cond1 AND Cond2 AND Cond3;
> >
> > Then I wish to check the last five bars if the buy statement is true and write the tickers to a watch list.
> >
> > MyPeriod = 5;
> >
> > for( i = 1; i < MyPeriod AND i < BarCount; i++ )
> > {
> >        if( Buy[i] )
> >        {
> >        CategoryAddSymbol( "", categoryWatchlist, 58 );
> >        }
> > }
> >
> > This adds nothing at all to the watchlist. Where does my logic go wrong on this one?
> >
> > Thanks
> >
> >
>




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

**** 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/