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

[EquisMetaStock Group] Q about comparing today's C with past values of another array..



PureBytes Links

Trading Reference Links

Hi,

I've been unable to solve the problem described below, and was hoping someone might know a trick
or two to achieve what I need.

I try to detect R and S levels based on the H/L values. For simplicity, let's say that each 55 day
top that holds the same value for 10 consecutive days (i.e. it wasn't broken again on the upside
within 10 days), then I consider it a valid R level that I'd like to consider in future trades. So
say the Resistance indicator is defined as follows -

{Resistance}
HighVals := HHV(C, 55);
If(Sum(HighVals = Ref(HighVals, -1), 10) = 10, HighVals, 0);

So if the condition is met, this indicator keeps its value at the 55 day high level as long as it
doesn't change again. If it changes, it brings it down to zero until the condition is met again.
The end result of this is that the indicator has (for the past bars) a bunch of zeros (where there
was no valid R level) or a valid R level for one or more days.

Now, as of today, if I'm in a long trade, I want to know the lowest value of any of these past R
levels that is greater than today's close. Say the values were 8, 6, 12, and 14, along with a
bunch of zeros, then I'd like to know that the next likely resistance point is 12 if the current
value is 10.

The problem is that if I try to compare the past non-zero values in the array with "C" (using
ValueWhen), it compares them to the C of the day when it was a non-zero value, and not "TODAY's
C". Effectively what I want is - find the LLV of all past R values that is greater than "TODAY's
C".

I'd appreciate if anyone can shed a light on how to solve this.

Thanks in advance.

Jitu


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Low on Ink? Get 80% off inkjet cartridges & Free Shipping at 77Colors.com.
We have your brand: HP, Epson, Lexmark, Canon, Compaq and more!
http://www.c1tracking.com/l.asp?cid=5981
http://us.click.yahoo.com/DmnqpB/IyhGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

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/