Announcement

Collapse
No announcement yet.

Several vertical lines in the future

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Several vertical lines in the future

    Hello,
    I tried to draw several vertical lines in a chart, but on the right of the last bar (with a correct choice for the right margin offset !), with indexes above 0 (>>0). And eSignal seems to refuse that.
    for information, I use this code :
    drawLineAbsolute(4, val1, 4, val2, PS_SOLID, 3, color1, "myline");
    to draw a vertical line in the index 4, from val1 to val2.

    I have two questions on that subject :
    - 1 -
    How can I draw two vertical lines, each with a specific index ? for example, the first line with index at 2, and the second line with index at 3.
    - 2 -
    Is it possible to draw two lines on the same index ?

    Another question about drawing something in a chart :
    Is it possible to draw a rectangle defined by two indexes, for example from index = -10 to index = 0, and by two values (on the Y-axis), for example from val1 to val2. And with a color defined by code to fill this rectangle (and not only to view the border).

    Thank you in advance.

  • #2
    Use drawLineRelative() for these functions. The current bar is always ZERO (0) in efs. So drawing at 2, 3, 4, 5+ draws lines to the RIGHT of the last bar on the chart.

    Doing this with drawLineAbsolute() will probably not work the way you want. The simple fix is "Relative" - like I explained.

    drawLineRelative(1,close(),1,high(), PS_SOLID, 2, Color.magenta, "HC");
    // Draws a high~close line 1 bar to the right of the last bar on the chart.

    drawLineRelative(2,low(),2,high(), PS_SOLID, 2, Color.magenta, "HC");
    // Draws a high~low line 2 bar to the right of the last bar on the chart.

    Let me know if this works for you?
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      of course, I will tell you if it works, but I have to reorganize a big code before I can use that.
      Thanks in advance.
      Mermoz

      Comment

      Working...
      X