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

Re: [EquisMetaStock Group] Need help for Exploration



PureBytes Links

Trading Reference Links

Wambui

> is there anyone who can help me?
> I want an exploration at daily base when Mov(RSI(c,3),3,e)<30 for long and
> Mov(RSI(c,3),3,e)>70 for short.
> Now I want the same formula on weekly-base and monthly-base in the same
> daily exploration. I know that I can change in option to the weekly and
> monthly base but it is not comfortable.
> So. please assist me how to make is.
> regards
> wambui

You could use the RSI Weekly indicator (for daily periodicy charts) below as the basis for your
exploration. This indicator already has two PREV's in it (for Wilders Smoothing), and creating an
EMA would require a third. You would then need to duplicate that for monthly values (with an Monthly
RSI) and you now have a total of 6 PREV's to deal with.

Even though you are using short periods I estimate that you'll still need possibly as many as 1000
daily bars of data to give accurate RSI and EMA results from the monthly indicator. The resulting
exploration is going to run many times slower than three different periodicy explorations with
standard code.

I'll help you with creating the code if you really want to go that way but I think setting up three
explorations with the same code  would be simpler.

Roy

PS  Jose's Calender Day counter can be found at..
http://users.bigpond.com/prominex/MetaStock/DayCount.txt

  {Weekly RSI - Close}
  {© 2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on daily charts with
   Jose Silva's "Calendar Week counter"}
N:=Input("Weekly RSI - Close Periods",1,99,10); Pc:=1/N;
F:=Input("End of Week,  5=Friday  6=Saturday  7=Sunday",5,7,5);
Q:=Input("Display Mode,  0=Static  1=Dynamic  2=Test",0,2,2);
  {0=Display, update on Friday when possible}
  {1=Display, update on each new bar}
  {2=Backtest, update on first bar of new week}
G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
I:=Fml("Calendar Week counter");
I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
F:=G OR (DayOfWeek()=F AND I=0);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=LastValue(Cum(1))=Cum(1);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
K:=ValueWhen(1,K>0,K);
Ua:=ValueWhen(1,J>0,K); Da:=ValueWhen(2,J>0,K);
Ub:=If(Ua>Da,Ua-Da,0); Db:=If(Ua<Da,Da-Ua,0);
U:=If(Cum(J>0)=N+1,Cum(If(J AND Cum(1)<>1,Ub,
  0))/N,ValueWhen(1,J>0,PREV)*(1-Pc)+Ub*Pc);
D:=If(Cum(J>0)=N+1,Cum(If(J AND Cum(1)<>1,Db,
  0))/N,ValueWhen(1,J>0,PREV)*(1-Pc)+Db*Pc);
D:=If(D=0,U,D);
D:=ValueWhen(1,D>0,D);
R:=100-(100/(1+(U/D)));
If(ValueWhen(N+1,J,R)>0,R,R);




 
Yahoo! Groups Links

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

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