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

[EquisMetaStock Group] Re: Coding help



PureBytes Links

Trading Reference Links

If I got it right, this formula might help:

rs:=RSI(9);
rs70c:=cross(rs,70);
30rsc:=cross(30,rs);
bs70:=BarsSince(rs70c);
bs30:=BarsSince(30rsc);
cond1:=bs70<bs30;
lrs:=LowestSince(1,rs70c,rs);
uptrend:=lrs>40 AND cond1;
cond2:=1-cond1;
hrs:=HighestSince(1,30rsc,rs);
downtrend:=hrs<60 AND cond2;
uptrend-downtrend

Regards,

mc

--- In equismetastock@xxxxxxxxxxxxxxx, Brett Sinclair
<brett_j_sinclair@xxx> wrote:
>
> I am hoping that someone can help me code the following in Metastock.
>  
> Up Trend
> Using a 9 period RSI, the first step is to determine how many
periods have passed since the RSI went above 70 and how many periods
have passed since it went below 30.   
> If there have been fewer periods since it was above 70, then we
check to see if the lowest value of RSI since that point is still
above 40.  If this is the case, then we have a confirmed up trend.  It
began when the RSI value first exceeded 70 and continues so long as
the lowest RSI value stays above 40.
>  
> Down Trend
> Using the same 9 period RSI, we determine how many periods have gone
by since the RSI went above 70 and how many periods have passed since
it went below 30. 
> If there have been fewer periods since it was below 30, then we
check to see if  the highest value of RSI since that point is still
below 60.  If this is the case then we have a confirmed down trend. 
It began when the RSI value first fell below 30 and continues so long
as the highest RSI value stays below 60.
>  
> Trading Range
>  
> 
> The trading range is simple to detect.  We find it be default.  When
an up trend ends, but a down trend is not detected by the above
criteria, a trading range has been established.  Of course, the
opposite is true too.  When a down trend ends, but an uptrend does not
show itself, a trading range has been established.  
>  
>  
> The indicator seems to work quite well using another software
platform, but my choice is Metastock.
>  
> Thanks, Brett
>  
>




------------------------------------

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/