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

[Metastockusers] Re: WEEKLY INDICATOR



PureBytes Links

Trading Reference Links

Hi Roy,

I have just "attempted" the 1st indicator and this is what I got:

N:=Input("Weekly RSI - Close Periods",1,99,13); 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,h,ValueWhen(2-G,1,h)));
K:=ValueWhen(1,K>0,K);
K1:=ValueWhen(1,J,If(J=1,l,ValueWhen(2-G,1,l)));
K1:=ValueWhen(1,K1>0,K1);
Ua:=ValueWhen(1,J>0,K); Da:=ValueWhen(2,J>0,K);
Ua1:=ValueWhen(1,J>0,K1); Da1:=ValueWhen(2,J>0,K1);
Ub:=If(Ua>Da,Ua-Da,0); Db:=If(Ua1<Da1,Da1-Ua1,0);
(Ub-ValueWhen(N+1,J,Ub))/N/(Ub-ValueWhen(N+1,J,Ub))/N +
(Db-ValueWhen(N+1,J,Db))/N;


I think I did everything right but it doesnt seem to  match the
original indicator

Norman




--- In Metastockusers@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx> wrote:
> Hi Norman
> 
> 
> Both formulas look as though they could be converted readily enough.
> Time is my problem, not complexity.
> 
> The June issue of MSTT will have a simpler timing mechanism
> for plotting weekly signals on EOD charts. That may make life a little 
> easier for you.
> 
> Simple moving averages are created differently from the exponential
> MAs used in MACD, and that might be where you're running into trouble.
> Here's how you can create an SMA once you have the weekly price.
> 
> X:=Cum((J>0)*K);
> (X-ValueWhen(N+1,J,X))/N;
> 
> Where "J" is the end-of-week timing signal, "K" is the weekly price
> (usually reserved for CLOSE), and "N" is the number of weeks.
> Once the weekly prices are available (Ow, Hw, Lw and K) it's just
> a matter of repeating the above formula to create all the simple
> moving averages you need. 
> 
> Changing "Ref(C,-2)" into the CLOSE from two weeks ago is also
> simple enough when you know and understand the formula, which is.
> 
> K2:=Valuewhen(3,J,K);
> 
> K2 is the weekly CLOSE delayed by two weeks (N+1), "J" is still
> the timing signal used, and "K" is the most recent weekly CLOSE.
> As with the earlier formula, the lookback range is "N+1", because
> the equivalent of looking back 2 periods using Ref() needs 3 when
> using ValueWhen(). 
> 
> 
> 
> Kind regards
> 
> Roy
> www.metastocktips.co.nz
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "ruagoodp" <almutwinter@xxxx>
> To: <Metastockusers@xxxxxxxxxxxxxxx>
> Sent: Thursday, May 26, 2005 6:06 AM
> Subject: [Metastockusers] WEEKLY INDICATOR
> 
> 
> > Hi Roy,
> > 
> > I have looked at your weekly RSI formula and its puzzling to say the
> > least.
> > 
> > I wanted to make these 2 oscillators into weekly indicators but have
> > not succeeded
> > 
> > 
> > 1st Weekly Indicator
> > 
> > (Mov(If(HIGH>Ref(HIGH,-1), HIGH-Ref(HIGH,-1), 0),13,S) /
> > (Mov(If(HIGH>Ref(HIGH,-1), HIGH-Ref(HIGH,-1), 0),13,S) +
> > Mov(If(LOW<Ref(LOW,-1), Ref(LOW,-1)-LOW, 0),13,S)) )
> > 
> > 
> > 
> > 2nd Weekly Indicator
> > 
> > x1:=If(Ref(H,-2),< ,Ref(C,-7),
> > If(Ref(H,-2),<,Ref(C,-8),
> > If(H,<,Ref(L,-5),
> > If(H,<,Ref(L,- 6),0,1),1),1),1);
> > x2:=If(Ref(L,-2),> ,Ref(C,-7),
> > If(Ref(L,-2),>,Ref(C,-8),
> > If(L,>,Ref(H,-5),
> > If(L,>,Ref(H,- 6),0,1),1),1),1);
> > SubValues:=(x1) * (x2) * (H-Ref(H,-2) ) +((x1) * (x2) *
(L-Ref(L,-2)) );
> > AbsDailyVal:=(Abs(H-Ref(H,-2)) + Abs(L-Ref(L,-2)));
> > Sum((SubValues),8) / Sum((AbsDailyVal),8)
> > 
> > 
> > Could you help me? If you are too busy, which is understandable, I
> > will keep on trying using your RSI weekly indicator to guide me.
> > 
> > Thanks
> > 
> > Norman
> > 
> > 
> > 
> > 
> >
--------------------------------------------------------------------------------
> > Yahoo! Groups Links
> > 
> >  a.. To visit your group on the web, go to:
> >  http://groups.yahoo.com/group/Metastockusers/
> >    
> >  b.. To unsubscribe from this group, send an email to:
> >  Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
> >    
> >  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> > 
> >




------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

<*> To unsubscribe from this group, send an email to:
    Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/