logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
lcl  
#1 Posted : Wednesday, November 16, 2005 1:36:28 AM(UTC)
lcl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 5/22/2005(UTC)
Posts: 59

"7 Up Weeks in a row in daily chart" Please help and thanks in advance!
mstt  
#2 Posted : Wednesday, November 16, 2005 3:05:44 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
lcl You could try this cut-down and modified version of a Weekly OHLC. {Weekly Rising CLOSE} {© 2005 Roy Larsen, rlarsen@man.quik.co.nz} {Timing module for weekly time frames} A:=DayOfWeek(); F:=PeakBars(1,Zig(A,1,$),1)=0 OR Cum(1) =LastValue(Cum(1)); {CLOSE for weekly frame} K:=ValueWhen(1,F,C); {CLOSE rising for 7 consecutive weeks} K>ValueWhen(2,F,K) AND ValueWhen(2,F,K)>ValueWhen(3,F,K) AND ValueWhen(3,F,K)>ValueWhen(4,F,K) AND ValueWhen(4,F,K)>ValueWhen(5,F,K) AND ValueWhen(5,F,K)>ValueWhen(6,F,K) AND ValueWhen(6,F,K)>ValueWhen(7,F,K) AND ValueWhen(7,F,K)>ValueWhen(8,F,K); Roy MetaStock Tips & Tools
lcl  
#3 Posted : Thursday, November 17, 2005 4:39:39 PM(UTC)
lcl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 5/22/2005(UTC)
Posts: 59

Thank you very much! :D
lcl  
#4 Posted : Friday, November 18, 2005 12:59:36 AM(UTC)
lcl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 5/22/2005(UTC)
Posts: 59

mstt wrote:
lcl You could try this cut-down and modified version of a Weekly OHLC. {Weekly Rising CLOSE} {?2005 Roy Larsen, rlarsen@man.quik.co.nz} {Timing module for weekly time frames} A:=DayOfWeek(); F:=PeakBars(1,Zig(A,1,$),1)=0 OR Cum(1) =LastValue(Cum(1)); {CLOSE for weekly frame} K:=ValueWhen(1,F,C); {CLOSE rising for 7 consecutive weeks} K>ValueWhen(2,F,K) AND ValueWhen(2,F,K)>ValueWhen(3,F,K) AND ValueWhen(3,F,K)>ValueWhen(4,F,K) AND ValueWhen(4,F,K)>ValueWhen(5,F,K) AND ValueWhen(5,F,K)>ValueWhen(6,F,K) AND ValueWhen(6,F,K)>ValueWhen(7,F,K) AND ValueWhen(7,F,K)>ValueWhen(8,F,K); Roy MetaStock Tips & Tools
Is it possible to use this modified version of MS code to plot weekly OHLC on daily charts? Once again, thanks in advance
mstt  
#5 Posted : Friday, November 18, 2005 2:05:47 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
lcl The indicator I posted was modified from what you are now asking for. Rather than modify it again, here's the formula it came from. It could be simplified somewhat, and removing the requirement for Jose's "Calendar Week counter" is one way to do that. However that would leave the indicator vulnerable to missing data of more than 3 bars. The Calendar Week counter is essential for ensuring the integrity of all weekly frames when missing data is a possibility. Weekly OHLC has 3 modes. Static plots the weekly OHLC on the Friday or last bar of the week, dynamic updates the current week on each bar, and delayed only plots new values on the first bar of a new week. When backtesting it should generally be used in delayed mode. As with most of my weekly indicators, this plots on weekly charts as well as EOD charts. That feature is useful for checking values when other functions are based on these weekly prices. {Weekly OHLC} {© 2005 Roy Larsen, rlarsen@man.quik.co.nz} {Use with Jose Silva's "Calendar Week counter" on EOD charts} {User settings} Q:=Input("Weekly OHLC Mode, 0=Static 1=Dynamic 2=Delayed",0,2,0); {0, update at last bar of current frame} {1, update on each new bar} {2, update on first bar of new frame} {Timing module for weekly frames} {Set I=0 for Monday to Thursday end-of-week} I:=Fml("Calendar Week counter"); A:=DayOfWeek(); G:=LastValue(Highest(Sum(A=5,5))=5); I:=I-ValueWhen(2-G,1,I); M:=G OR I>0; F:=G OR (M=0 AND PeakBars(1,Zig(A,1,$),1)=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)); {Prices for weekly frames} Ow:=ValueWhen(1,M,O); Ow:=ValueWhen(1,J,If(J=1,Ow,ValueWhen(2-G,1,Ow))); Hw:=HighestSince(1,M,H); Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2-G,1,Hw))); Lw:=LowestSince(1,M,L); Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2-G,1,Lw))); K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C))); Ow:=ValueWhen(1,Ow>0,Ow); Hw:=ValueWhen(1,Hw>0,Hw); Lw:=ValueWhen(1,Lw>0,Lw); {Plot results} Ow; Hw; Lw; K; {Weekly OHLC} Roy MetaStock Tips & Tools
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.