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

[EquisMetaStock Group] Coding Assistance



PureBytes Links

Trading Reference Links

I'm having a problem, and asking for help, with the following:

An uptrend is defined as:  if (days since RSI(9) > 70) < (days since 
RSI(9) < 30) and the lowest low value of RSI(9) since then > 40.

A downtrend is defined as:  if (days since RSI(9) < 30) < (days since 
RSI(9) > 70) and the highest high value of RSI(9) since then < 60

If neither condition is satisfied, then it's a trading range.

This should be plotted as a histogram.

I've coded this as follows (MS 7.2 if that matters):

up:=BarsSince(RSI(9)>70);
down:=BarsSince(RSI(9)<30);

uptrend:=up<down AND LLV(RSI(9),up) > 40;

downtrend:=down<up AND HHV(RSI(9),down) < 60;

Here are the problems: 

1.  I sometimes get an error that says something like "function 
error, zero value passed to LLV (or HHV)".

2.  I'm not sure how to get this to plot the results properly.

3.  Sometimes the code appears to work, but the "trending"
portion of 
the graph is very small and occasional, while the "ranging"
portion 
of the graph takes up most of the space.  This is the opposite of 
what I was expecting, and doesn't appear to correlate to the
actual 
price movement at all.

Can anybody help make sense of all this?  Thanks in a advance. 




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/BVVfoB/hP.FAA/uetFAA/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/