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

RE: [EquisMetaStock Group] Coding help



PureBytes Links

Trading Reference Links

Thanks, Brett

--- On Fri, 2/6/09, Pete Lieber <plieber@xxxxxxxxxxxxxx> wrote:
From: Pete Lieber <plieber@xxxxxxxxxxxxxx>
Subject: RE: [EquisMetaStock Group] Coding help
To: "EquisMetastock" <equismetastock@xxxxxxxxxxxxxxx>
Date: Friday, February 6, 2009, 12:02 PM

RSI Up Trend

periods:= Input("periods" ,2,200,9) ;
level1:= Input("level1" , 0,100,70);
level2:= Input("level2" , 0,100,30);
level3:= Input("level3" , 0,100,40);

If(BarsSince( RSI(periods)>level1) < BarsSince(RSI( periods)<level2) AND RSI(periods) > level3,1,0)

This indicator will = 1, whenever your Up Trend condition is met

Conversely, here is this indicator as a down trend


RSI Down Trend

periods:= Input("periods" ,2,200,9) ;
level1:= Input("level1" , 0,100,30);
level2:= Input("level2" , 0,100,70);
level3:= Input("level3" , 0,100,60);

If(BarsSince( RSI(periods)<level1) < BarsSince(RSI( periods)>level2) AND RSI(periods) <level3,-1,0)


To: equismetastock@ yahoogroups. com
From: brett_j_sinclair@ yahoo.com
Date: Fri, 6 Feb 2009 07:30:31 -0800
Subject: [EquisMetaStock Group] Coding help

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
 


__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___