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

Notification

Icon
Error

Options
Go to last post Go to first unread
yechiyah  
#1 Posted : Saturday, November 21, 2009 11:55:07 AM(UTC)
yechiyah

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/20/2008(UTC)
Posts: 2

Is there a way to have MetaStock place a horizontal line on a chart using code?
johnl  
#2 Posted : Saturday, November 21, 2009 7:20:08 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

How about:

a1:=20;
a2:=LastValue(a1);
a2


yechiyah  
#3 Posted : Sunday, November 22, 2009 10:40:18 AM(UTC)
yechiyah

Rank: Newbie

Groups: Registered, Registered Users
Joined: 9/20/2008(UTC)
Posts: 2

Thanks, that is what I was looking for!
mstt  
#4 Posted : Sunday, November 22, 2009 3:44:06 PM(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)

Hi yechiyah

20; will also work. LastValue() is generally not needed for constants, though it certainly wouldn't do any harm.

When an indicator is also used by an exploration, expert or other indicator and it's required to plot a constant as well as its primary output, make sure that the constant is NOT the last output from the indicator. An Fml() call will only call the LST output, and you probably won't want that to be a constant.

Roy

moyukh2007  
#5 Posted : Thursday, January 17, 2013 12:58:54 PM(UTC)
moyukh2007

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/17/2013(UTC)
Posts: 3

Hi,

Can U pls tell me how can print the value of horizontal line(20 in this case) at the end of the line.

wabbit  
#6 Posted : Thursday, January 17, 2013 3:01:53 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Don't multiple post.


wabbit [:D]

Admin: can we get the post deletion problems sorted out pls?
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.