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

[amibroker] median calculation



PureBytes Links

Trading Reference Links


I know that the median function will return the median value of the 
entire array, but how would one go about finding the median of only 
some of the values in an array?

So far, I've managed only to identify the peaks in an oscillator I've 
coded, but I'm trying to have the program find the median of ONLY the 
four highest peaks within a user-defined lookback range (likewise 
with the four lowest troughs below zero).

I think I can stumble around and figure out how to code what I need 
once I get past this median problem. I've spent two days on this 
trying to figure it out (I feel like Thomas Edison - I've discovered 
a thousand ways to NOT find the median). : )

Has anyone had a similar problem and found a somewhat simple 
solution, or perhaps be willing to point me in some direction?

DC





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