PureBytes Links
Trading Reference Links
|
You could try this, it will find the HHV(H,30) whenever the bar number is
multiple of 30, and then assign that value to the following 29 bars (eg
31-59)
PeriodEnd = cum(1)%30==0;
PeriodHigh = iif( PeriodEnd, HHV(H,30), valuewhen(PeriodEnd,hhv(h,30)));
Cheers,
Graham
http://e-wire.net.au/~eb_kavan/
-----Original Message-----
From: elee67 [mailto:elee67@xxxxxxxxx]
Sent: Saturday, March 20, 2004 10:37 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Highest and lowest value every X Period
hello,
instead of doing it via a for loop, is there a way to calculate for
every X period the high and low value?
i.e. The last 30 days, I want the high and the low, then from days
31-60 I want the high and low, then 61-90 I want the high and low.
I know there are functions such as hhv and highest but can't seem to
figure out how best to have them function in ranges.
Thanks!
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/
|