Hi kct
There doesn't appear to be a good reason why you
can't use a "Weekly WMA" formula as part of your daily exploration, and
just forget about the weekly exploration. Both of the following
indicator formulas require Jose Silva's "Calendar Week counter". The first
formula is an adjustable Weekly WMA, and it's limited to no more than 30 weeks.
The second formula is a modified version of the first with some of the redundant
code removed and the "5 weeks rising" requirement added (as per your
specification).
You would use either of these formulas by creating
the indicators and calling them using Fml() rather than loading an entire
formula into the Explorer.
The construction of a Weekly WMA formula
was discussed in the MetaStock Tips & Tools newsletter a couple of months
ago.
Hope this helps.
Regards
Roy
{Weekly WMA - Close} {© 2005 Roy
Larsen, www.metastocktips.co.nz}
{for use on daily charts with Jose Silva's "Calendar Week
counter"} N:=Input("Weekly WMA - Periods",1,30,30); 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,1); {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:=ValueWhen(2,1,A); 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))); X:=LastValue(Cum(Cum(1)*(Cum(1)<=N))); (K*N
+
(N>1)*ValueWhen(2,J,K)*(N-1)+ (N>2)*ValueWhen(3,J,K)*(N-2)+ (N>3)*ValueWhen(4,J,K)*(N-3)+ (N>4)*ValueWhen(5,J,K)*(N-4)+ (N>5)*ValueWhen(6,J,K)*(N-5)+ (N>6)*ValueWhen(7,J,K)*(N-6)+ (N>7)*ValueWhen(8,J,K)*(N-7)+ (N>8)*ValueWhen(9,J,K)*(N-8)+ (N>9)*ValueWhen(10,J,K)*(N-9)+ (N>10)*ValueWhen(11,J,K)*(N-10)+ (N>11)*ValueWhen(12,J,K)*(N-11)+ (N>12)*ValueWhen(13,J,K)*(N-12)+ (N>13)*ValueWhen(14,J,K)*(N-13)+ (N>14)*ValueWhen(15,J,K)*(N-14)+ (N>15)*ValueWhen(16,J,K)*(N-15)+ (N>16)*ValueWhen(17,J,K)*(N-16)+ (N>17)*ValueWhen(18,J,K)*(N-17)+ (N>18)*ValueWhen(19,J,K)*(N-18)+ (N>19)*ValueWhen(20,J,K)*(N-19)+ (N>20)*ValueWhen(21,J,K)*(N-20)+ (N>21)*ValueWhen(22,J,K)*(N-21)+ (N>22)*ValueWhen(23,J,K)*(N-22)+ (N>23)*ValueWhen(24,J,K)*(N-23)+ (N>24)*ValueWhen(25,J,K)*(N-24)+ (N>25)*ValueWhen(26,J,K)*(N-25)+ (N>26)*ValueWhen(27,J,K)*(N-26)+ (N>27)*ValueWhen(28,J,K)*(N-27)+ (N>28)*ValueWhen(29,J,K)*(N-28)+ (N>29)*ValueWhen(30,J,K)*(N-29))/X;
{Weekly WMA - C Special} {© 2005
Roy Larsen, www.metastocktips.co.nz}
{for use on daily charts with Jose Silva's "Calendar Week
counter"} N:=Input("Weekly WMA - Periods",30,30,30); 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,1); {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:=ValueWhen(2,1,A); 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))); X:=LastValue(Cum(Cum(1)*(Cum(1)<=N))); Z:=(K*N+ValueWhen(2,J,K)*29+ ValueWhen(3,J,K)*28+ValueWhen(4,J,K)*27+ ValueWhen(5,J,K)*26+ValueWhen(6,J,K)*25+ ValueWhen(7,J,K)*24+ValueWhen(8,J,K)*23+ ValueWhen(9,J,K)*22+ValueWhen(10,J,K)*21+ ValueWhen(11,J,K)*20+ValueWhen(12,J,K)*19+ ValueWhen(13,J,K)*18+ValueWhen(14,J,K)*17+ ValueWhen(15,J,K)*16+ValueWhen(16,J,K)*15+ ValueWhen(17,J,K)*14+ValueWhen(18,J,K)*13+ ValueWhen(19,J,K)*12+ValueWhen(20,J,K)*11+ ValueWhen(21,J,K)*10+ValueWhen(22,J,K)*9+ ValueWhen(23,J,K)*8+ValueWhen(24,J,K)*7+ ValueWhen(25,J,K)*6+ValueWhen(26,J,K)*5+ ValueWhen(27,J,K)*4+ValueWhen(28,J,K)*3+ ValueWhen(29,J,K)*2+ValueWhen(30,J,K))/X; Z>ValueWhen(2,J,Z)
AND ValueWhen(2,J,Z)>ValueWhen(3,J,Z)
AND ValueWhen(3,J,Z)>ValueWhen(4,J,Z)
AND ValueWhen(4,J,Z)>ValueWhen(5,J,Z)
AND ValueWhen(5,J,Z)>ValueWhen(6,J,Z);
----- Original Message -----
Sent: Wednesday, September 28, 2005 3:28 AM
Subject: [EquisMetaStock Group] 2 criteria (daily & weekly) in
one exploration - possible?
I have 2 criteria for an exploration but one is in DAILY and
the other in WEEKLY periodicity. Basically I would like to have my modified
MACD crossover the signal line in DAILY periodicity and for those stocks
selected to have a 30WMA uptrend the last 5 weeks on the WEEKLY chart.
This exploration is intended to be run on a daily basis.
{1st. filter
in DAILY
periodicity} MyMACD:=Mov(C,6,E)-Mov(C,19,E); signal:=Mov(MyMACD,9,E); Cross(MyMACD,signal)
{2nd.
filter in WEEKLY periodicity} MA:=Mov(C,30,W); MA>Ref(MA,-1) AND
Ref(MA,-1)>Ref(MA,-2) AND Ref(MA,-2)>Ref(MA,-3) AND
Ref(MA,-3)>Ref(MA,-4) AND Ref(MA,-4)>Ref(MA,-5)
My
question:-
(1) Is it possible to run an exploration whereby the first
"DAILY" filter is satisfied AND followed by the second "WEEKLY"
filter?
(2) Alternatively can I run the first DAILY exploration, then
save the selected stocks in a separate folder and then run the second WEEKLY
exploration on this separate folder?
Any suggestion will be much
appreciated. Thank you.
Regards, kct
SPONSORED LINKS
YAHOO! GROUPS LINKS
|