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

[amibroker] Expanded Aroon Indicator



PureBytes Links

Trading Reference Links

I pulled the Aroon indicator, written by Tomasz, from the library.
While you can see it in its entirety there, let me reproduce one part of
it in order to ask my question.

Here is the indicator (one half of it), AroonUp:

H14 = HHV( High, 14 );

AroonUp =
100 * ( 14 - ( ( IIf(Ref(H ,-1) == H14 ,1 ,
	IIf(Ref(H ,-2 ) == H14 ,2,
	IIf(Ref(H ,-3 ) == H14 ,3, 
	IIf(Ref(H ,-4 ) == H14 ,4 ,
	IIf(Ref(H ,-5 ) == H14 ,5 ,
	IIf(Ref(H ,-6 ) == H14 ,6 ,
	IIf(Ref(H ,-7 ) == H14 ,7 ,
	IIf(Ref(H ,-8 ) == H14 ,8 , 
	IIf(Ref(H ,-9 ) == H14 ,9 ,
	IIf(Ref(H ,-10 ) == H14 ,10 ,
	IIf(Ref(H ,-11 ) == H14 ,11 ,
	IIf(Ref(H ,-12 ) == H14 ,12 ,
	IIf(Ref(H ,-13) == H14 ,13 ,
	IIf(Ref(H ,-14 ) == H14 ,14 ,0 ) ) ) ) ) )
) ) ) ) ) ) ) ) ) ) ) / 14;

Now, putting in a Parameter statement for the HHV length of 14 is
obviously meaningless because the ArronUp statement has 14 IIf
comparisons. 

My question for those loop writers who are more experienced than me is
this: how do you construct a loop structure which increase the
comparison sections as the lookback period increases or decreases the
comparison sections as the lookback period decreases.

Tomasz wrote this Aroon structure in the days (2001) before Amibroker
had loops and functions etc.  So how could it be written today in order
to easily change the lookback period without massive changes to the IIf
comparisons?

I hope the question is clear; if not, ask and I will attempt another
explanation.

Any ideas?

Thanks,

Ken

PS:  I have looked at this indicator before (outside of Amibroker) but
was stimulated by a recent article in the Ensign Newsletter that has
this to say about using the Aroon indicator.  BTW, a parameter screen
from the article showed a 6 period lookback which is what got me
thinking about how to change the AB Aroon indicator.

Ah, the text is too long to put in here.  Better, if you are interested,
is to go to the following address where you can read all of the Ensign
Newsletters, which sometimes contain useful info apart from the Ensign
program.

http://www.ensignsoftware.com/tips/newsletter.htm

The Aroon discussion is in the Sept Newsletter, the second section about
half way down the page.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 9/22/2004
 



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