Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi,
Wishing all a Happy Trading Year ahead. Could any one of you help me build an indicator that would denote the last days close price as a line for the next days realtime chart?
Thanks
Sourav :roll:
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Souray, try this chart indicator:
[code:1:f84b04c63e]NuDay:=DayOfMonth()<>Ref(DayOfMonth(),-1);
ValueWhen(1,NuDay,Ref(C,-1))
[/code:1:f84b04c63e]
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi Jose,
Thanks for your kind help. How can I denote the last high & low in this manner?
Regards
Sourav
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
It depends what you mean by the "last high/low".
You may want to take a look at this intraday pivots code.
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi Jose,
I meant High and Low for the last day.
Thanks
Sourav
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey sourav.... you might be able to adapt jose's codes.....h
NuDay:=DayOfMonth()<>Ref(DayOfMonth(),-1);
ValueWhen(1,NuDay,Ref(C,-1));
NuDay:=DayOfMonth()<>Ref(DayOfMonth(),-1);
ValueWhen(1,NuDay,Ref(H,-1));
NuDay:=DayOfMonth()<>Ref(DayOfMonth(),-1);
ValueWhen(1,NuDay,Ref(L,-1))
--------------------------------------------------
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
scratch that.... it references on the last bar, not entire h,l,c of last day....h
|
|
|
|
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)
|
Sourav
Try this.
NuDay:=DayOfMonth()<>Ref(DayOfMonth(),-1);
Cc:=ValueWhen(1,NuDay,Ref(C,-1));
Hh:=ValueWhen(1,NuDay,Ref(HighestSince(1,NuDay,H),-1));
Ll:=ValueWhen(1,NuDay,Ref(LowestSince(1,NuDay,L),-1));
Cc;
ValueWhen(1,Hh>0,Hh);
ValueWhen(1,Ll>0,Ll);
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/19/2005(UTC) Posts: 22
|
Hi,
It was just what I needed. Thanks a lot for your kind help.
regards
Sourav
|
|
|
|
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.