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

Re: [amibroker] Re: lastvalue and N last quotations



PureBytes Links

Trading Reference Links

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@xxxxxxxxx>:
> 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/