in Search

Horizontal line.

Last post 11-22-2009, 15:44 by mstt. 3 replies.
Sort Posts: Previous Next
  •  11-21-2009, 11:55 31256

    Horizontal line.

    Is there a way to have MetaStock place a horizontal line on a chart using code?
  •  11-21-2009, 19:20 31260 in reply to 31256

    Re: Horizontal line.

     How about:

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


  •  11-22-2009, 10:40 31264 in reply to 31260

    Re: Horizontal line.

    Thanks, that is what I was looking for!
  •  11-22-2009, 15:44 31271 in reply to 31264

    Re: Horizontal line.

    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

View as RSS news feed in XML