PureBytes Links
Trading Reference Links
|
I should check - am I reinventing the wheel here? My basic aim is to
be able to find new highs without limiting the search to a certain
period (e.g. if I search for prices crossing the prior 100 period
high, this will miss the break of a 110 day high, and so on). Is this
built into a function? or has someone already written the code for
this?
I've looked but can't find anything.
Thanks
Chris
--- In amibroker@xxxxxxxxxxxxxxx, "Kropotkin" <backup_dayad@xxxx>
wrote:
> 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 --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/
|