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

Re: [EquisMetaStock Group] Weekly Stochastic / Rsi on daily chart



PureBytes Links

Trading Reference Links

{Weekly OHLC}
  {Copyright© 2003 Roy Larsen}
  {rlarsen@xxxxxxxxxxxxxx}
  {use on daily charts}
Q:=Input("Dynamic Current Week?",0,1,1);
{0=Update when end of current week is known}
{1=MS compatible dynamic current week}
M:=DayOfWeek()<=ValueWhen(2,1,DayOfWeek());
F:=DayOfWeek()=5;
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,1,(B=0)*J);
Hw:=HighestSince(1,M,H);
Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2,1,Hw)));
Lw:=LowestSince(1,M,L);
Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2,1,Lw)));
Cw:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
Ow:=ValueWhen(1,J,If(J=1,ValueWhen(1,M,O),
  ValueWhen(2,M OR Cum(1)=3,O)));
Ow:=ValueWhen(1,Lw>0,Ow); {O}
Hw:=ValueWhen(1,Lw>0,Hw); {H}
Lw:=ValueWhen(1,Lw>0,Lw); {L}
Cw:=ValueWhen(1,Lw>0,Cw); {C}
q1:=input("set lenght of sample (in weeks)",1,99,13);
k1:=rsi(cw,5*q1);
k1;

--- tan kok hong <tankokhong2002@xxxxxxxxx> wrote:
> hello ! 
> 
> can someone tell me where can I get the formula
> which
> are able to plot the weekly RSI or weekly Stochastic
> on the daily charts ?
> 
> thanks !
> 
> 
> --- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> > jaguar
> > 
> > 
> > > What I am tring to do is to add a number of
> > different timeframes of
> > > the Stochastic to one chart.  If I have a 14,3
> on
> > a 10 minute chart
> > > and want to show this indicator from a 20 minute
> > chart on the 10
> > > minute chart do I double the 14,3?
> > 
> > This "Frame Stochastic Osc SMA" is based on my
> > weekly Stoch Osc for daily charts and will do what
> > you say you want much more accurately than merely
> > changing the numbers. Changing the numbers just
> > changes the oscillator values for the existing
> > timeframe. It has little relationship to the
> > oscillator values for a longer (or shorter)
> > timeframe.
> > 
> > Getting the oscillator to work as intended
> requires
> > one primary variable 'M' to be defined by you.
> > This is the first bar of the required timeframe -
> > for use on daily charts as a weekly oscillator
> > this would be Monday, or the first trading day of
> > the week.
> > 
> > It's also necessary (if you want to use other than
> > the "test" mode) to define the last bar of the
> > frame, 'F' variable, if and when it is present.
> For
> > daily/weekly usage this would be the Friday bar.
> > This enables the indicator to update as this bar
> is
> > formed. In test mode each frame will be updated
> > when the first bar of the next frame is created.
> > 
> > The 'G' variable is there to signal when the chart
> > periodicy is already set to the longer time frame
> > and therefore there is no need to group bars into
> > separate frames to form a new data array (the
> > indicator is to operate in the same timeframe as
> the
> > chart).
> > 
> > I have only made a crude attempt to set 'M', and
> no
> > attempt at all to set 'F' and 'G' to your
> > requirements. 'G' is presently set to
> differentiate
> > between intraday and daily charts.
> > 
> > This indicator has an SMA signal line. A slightly
> > different version is required for an EMA signal
> > line.
> > 
> > Roy
> > 
> >   {Frame Stochastic Osc SMA}
> >   {Copyright© 2003-2004 Roy Larsen}
> >   {rlarsen@xxxxxxxxxxxxxx}
> >   {for use on intraday charts}
> > K:=Input("%K Periods",1,99,5);
> > N:=Input("%K Slowing Periods" ,1,99,3);
> > R:=Input("%D SMA Periods",1,99,3);
> > Q:=Input("Display Mode,  0=Static  1=Dynamic 
> > 2=Test",0,2,2);
> >   {0=Display, update at last bar of frame}
> >   {1=Display, update on each new bar}
> >   {2=Backtest, update on first bar of new frame}
> > M:=Frac(Minute()/20)=0; {first bar of frame ?}
> > F:=0; {last bar of frame ?}
> > G:=LastValue(Highest(Sum(DayOfWeek()<>
> >    ValueWhen(2,1,DayOfWeek()),5))=5);
> > F:=F OR G;
> > 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=2,1,(B=0)*J);
> > J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
> > M:=G OR M;
> > Hw:=HighestSince(1,M,H);
> > Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2,1,Hw)));
> > Lw:=LowestSince(1,M,L);
> > Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2,1,Lw)));
> > Cw:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
> > Hw:=ValueWhen(1,Lw>0,Hw);
> > Lw:=ValueWhen(1,Lw>0,Lw);
> > Cw:=ValueWhen(1,Lw>0,Cw);
> > G:=Cum((Cw-LowestSince(K,J,Lw))*(J>0));
> > G:=G-ValueWhen(N+1,J,G);
> > I:=Cum((HighestSince(K,J,Hw)-
> > LowestSince(K,J,Lw))*(J>0));
> > I:=I-ValueWhen(N+1,J,I);
> > I:=ValueWhen(1,Cum(I>0)>0,I);
> > X:=100*G/I;
> > Y:=Cum((J>0)*X);
> > Y:=(Y-ValueWhen(R+1,J,Y))/R;
> > X; {%K}
> > Y; {%D}
> > 
> > 
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.
> http://antispam.yahoo.com/tools
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> 
>  
> Yahoo! Groups Links
> 
> 
>      equismetastock-unsubscribe@xxxxxxxxxxxxxxx
> 
>  
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools


 
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/