Discussions
»
Community Forums
»
Technical Chat
»
Pls help on generating an horizontal line
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/3/2005(UTC) Posts: 64 Location: India
|
hi,
i have created an indicator and it calculates value on previous day basis. single day previous.
now i know what value comes out. but it being one single point is shown as dot on chart.
is that possible that instead of dot, i can get a horizontal line in its place automatically.
pls guide....
waiting for reply.
Navneet Singhal
www.navneetsinghal.blogspot.com
email: coolguynavneet@gmail.com
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/3/2005(UTC) Posts: 64 Location: India
|
was that a very high thing i demanded from metastock software............
no body answered.............
pls answer is it possible or not.........
thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 9/13/2004(UTC) Posts: 673 Location: Salt Lake City, UT
|
If you include the code I can try and see what is happening. Alternately you can email formulas@equis.com for debugging assistance.
|
|
|
|
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)
|
Navneet
It is not difficult to do what you ask. The procedure is as follows.
Mark the bar on which the wanted value is plotted.
Use ValueWhen() to plot that value.
Use LastValue() to extend the line across all bars on the chart.
There are several ways in which the basic procedure can be applied and I’ll leave it to you to sort out what works best. The second to last bar van be marked like so.
B:=LastValue(Cum(1))-1=Cum(1);
Let’s assume your signal for this example is a 10-period SMA.
M:=Mov(C,10,S);
So the value of the moving average on the second to last bar can be plotted with -
X:=ValueWhen(1,B,M);
And that line can be extended with LastValue(). The completed formula might look like this below.
B:=LastValue(Cum(1))-1=Cum(1);
M:=Mov(C,10,S);
X:=ValueWhen(1,B,M);
LastValue(X);
Roy
MetaStock Tips & Tools
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/3/2005(UTC) Posts: 64 Location: India
|
Thank You Mr. Roy.
It was wondeful use of these fuctions. I have made my formula with the help of u r exapmle.
Thanks a lot.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Community Forums
»
Technical Chat
»
Pls help on generating an horizontal line
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.