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

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



PureBytes Links

Trading Reference Links

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




 
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/