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

RE: [EquisMetaStock Group] Re: How to remove 3 highest/lowest values in a range



PureBytes Links

Trading Reference Links

Jose, you are just amazing :-)
Now, if I was to calculate the mean of the remaining 14 values (20 values - 
6 removed =14), I guess I would use something like this:
(Sum(x,20) -Hi1 -Hi2 -Hi3 -Lo1 -Lo2 -Lo3) /14.
Correct me if I am wrong...

JD
==================================

From: "Jose" <josesilva22@xxxxxxxxx>
Reply-To: equismetastock@xxxxxxxxxxxxxxx
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Re: How to remove 3 highest/lowest values in 
a range
Date: Mon, 15 Mar 2004 14:22:46 -0000


Maybe something like this:

---8<------------------------------

pds:=Input("HHV/LLV lookback periods",
  2,2520,20);

x:=Mo(5);  {indicator formula}

Hi1:=HHV(x,pds);
Hi2:=HHV(ValueWhen(1,x<Hi1,x),pds);
Hi3:=HHV(ValueWhen(1,x<Hi2,x),pds);
Lo1:=LLV(x,pds);
Lo2:=LLV(ValueWhen(1,x>Lo1,x),pds);
Lo3:=LLV(ValueWhen(1,x>Lo2,x),pds);
xMinMax:=ValueWhen(1,x<Hi3 AND x>Lo3,x);

x;xMinMax

---8<------------------------------


jose '-)
http://users.bigpond.com/prominex/pegasus.htm


--- In equismetastock@xxxxxxxxxxxxxxx, "John Doe" <ms001122@xxxx>
wrote:
 > While its easy to identify, and thus remove, the highest or lowest
values in
 > a range of values, does anyone know how to remove the 3 highest and
3 lowest
 > values in a range? e.g. If I have a range of values for a variable
over 20
 > days (i.e. 20 values) and I want to remove the 3 highest and 3
lowest
 > values, how do I do that? Thanks in advance!
 >
 > JD

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



 
Yahoo! Groups Links

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

<*> To unsubscribe from this group, send an email to:
     equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/