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

Re: [amibroker] EOD source



PureBytes Links

Trading Reference Links

I'm trying to find how many days since there was a higher price than 
today's. This works:

     Condition=H>LastValue(H);
     nH=BarsSince(Condition);

(thanks to those who helped me with this, incl Dimitris).


The problem is that LastValue(H) is not suitable for backtesting, as 
it will reference forward to the final bar. 

How can I get around it? Is there a way I can reference the bar for 
which the exploration is being done? 

Or can I turn the variable BarIndex() for the present day, from an 
array into a number? (Then e.g. I could call that number "today" and 
use "Condition=H>H[today];")

( I want this scan to also run quickly for when I do intraday scans, 
so if possible I'd rather avoid using Cum or If functions which 
require computations for every bar of the stock ).

Thanks, 
Chris



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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