[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 for Jose



PureBytes Links

Trading Reference Links

That works Jose for unique values of the high and low, but what about 
eliminating the three highest values if they all happen to be the 
same value?

I tried one, but it used a whole pile of PREVs which didn't look 
pretty, so I stopped....

wabbit :D

--- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx> 
wrote:
> 
> 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 Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/BefplB/TM
---------------------------------------------------------------------~->

 
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/