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

Re: [EquisMetaStock Group] RSI



PureBytes Links

Trading Reference Links

Andy,

Love to see someone willing to learn. Okay, let's look at the formula 
that Roy provided.

{1}{RSI Indicator}
{2}A:=Input("Periods",2,99,10);
{3}B:=P; {target array}
{4}U:=Wilders(If(B>Ref(B,-1),B-Ref(B,-1),0),A);
{5}D:=Wilders(If(B<Ref(B,-1),Ref(B,-1)-B,0),A);
{6}100-(100/(1+(U/D)));

Notice that I have numbered the lines so that reference will be a 
little easier. In line 4 and 5 we are using using several roc's     
[B>Ref(B,-1)]. This is where you will need to make your changes.

Now consider how many days of trading occur in a week, a month, a 
year. Adjust the ref periods to that number and you will have what 
you are looking for. A week is usually 5 and a year is usually 280, I 
believe. So in order to change the RSI to a weekly specific indicator 
you will end up with an indicator that look like: 

{1}{RSI Indicator}
{2}A:=Input("Periods",2,99,10);
{3}B:=P; {target array}
{4}U:=Wilders(If(B>Ref(B,-5),B-Ref(B,-5),0),A);
{5}D:=Wilders(If(B<Ref(B,-5),Ref(B,-5)-B,0),A);
{6}100-(100/(1+(U/D)));

Notice in lines 4 and 5 that I changed the number 1 to the number 5. 
This is a debatable value for a lot of reasons. Some may say that 4 
would actually give you a total of 5 roc periods. Your data may be on 
issues that are traded 24/7 and not 7 1/2 for 5 days as was the case 
in most exchanges until recently. The key is what works best for you 
and what type of data you are using. 

Another idea here is to allow for a ROC period change without having 
to open up the formula each time as we have done with the smoothing 
lookback periods input. To do this the indicator would be:

{1}{RSI Ind var ROC}
{2}A:=Input("Periods",2,99,10);
{3}X:=Input("ROC Periods",1,399,1);
{4}B:=P; {target array}
{5}U:=Wilders(If(B>Ref(B,-X),B-Ref(B,-X),0),A);
{6}D:=Wilders(If(B<Ref(B,-X),Ref(B,-X)-B,0),A);
{7}100-(100/(1+(U/D)));

Okay, class dismissed! Your homework is to test and report back on 
your results. :-)

Preston




--- In equismetastock@xxxxxxxxxxxxxxx, "Andycan" <andycan@xxxx> wrote:
>  i have been testing various TA for my tradintg stratergies but i 
am 
> > having a prob with programming indicators in metastock though i 
am 
> > familiar thet metastock has its own rsi what i wanted to do was 
to 
> > vary the periods rate of change similar to LBR/RSI concept. could 
> > somebody help me in this matter i am currently having to do it 
> > manually and its limiting the number of securities that i can 
back 
> > test this on
> > 
> > 
> > Thanks in advance
> > 
> > Andy
> 
> 
>   ----- Original Message ----- 
>   From: Roy Larsen 
>   To: equismetastock@xxxxxxxxxxxxxxx 
>   Sent: Wednesday, March 12, 2003 5:40 PM
>   Subject: Re: [EquisMetaStock Group] RSI
> 
> 
>   Andy
> 
>   Here's the formula for RSI. hope this helps
> 
>     {RSI Indicator}
>   A:=Input("Periods",2,99,10);
>   B:=P; {target array}
>   U:=Wilders(If(B>Ref(B,-1),B-Ref(B,-1),0),A);
>   D:=Wilders(If(B<Ref(B,-1),Ref(B,-1)-B,0),A);
>   100-(100/(1+(U/D)));
> 
>   Roy
> 
> 
>   i like to say thank you to those who helped me, i am still in the 
learning proceses of using metastock and i can see that i would have 
to accomodate the roc for my scenario but i don't think i can do this 
would those who find this straight forward please tell me what 
alteration to the formula to obtain my objective of analysing todays 
close minus yesterdays close 
> 
> 
>   kind regards
> 
>   Andy


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/