Announcement

Collapse
No announcement yet.

Need Help with Line Drawing

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

  • Need Help with Line Drawing

    I am on a daily chart and I am trying to draw a vertical line on a specified date in history, can some one show me an example?

    Thanks
    EK

  • #2
    Emerald King,

    here is a screenshot showing how to put a vertical line on the chart. I hope this helps.

    Comment


    • #3
      Sorry I wasnt Clear

      Hello Steve,

      Thanks for taking the time to help me out.

      What I am looking for is how to do it via EFS

      Thanks
      EK

      Comment


      • #4
        /************************************************** ***************
        Provided By : eSignal. (c) Copyright 2004
        ************************************************** ***************/

        function preMain() {
        setPriceStudy(true);
        setStudyTitle("Horizontal Line ");
        setShowTitleParameters(false);
        //setComputeOnClose();

        var fp1 = new FunctionParameter("nLength", FunctionParameter.NUMBER);
        fp1.setName("Length");
        fp1.setLowerLimit(1);
        fp1.setDefault(20);

        var fp2 = new FunctionParameter("nThickness", FunctionParameter.NUMBER);
        fp2.setName("Thickness");
        fp2.setLowerLimit(1);
        fp2.setDefault(1);

        var fp3 = new FunctionParameter("cColor", FunctionParameter.COLOR);
        fp3.setName("Color");
        fp3.setDefault(Color.red);
        }

        function main(nLength, nThickness, cColor) {
        drawLineRelative(-nLength, close(), 0, close(), PS_SOLID, nThickness, cColor, "HLine");
        return;
        }

        Comment


        • #5
          I have an efs I had been working on, it is relatively complex as my intent is to adapt it to different line types as well. It also can be used in different timeframes in addition to saving the lines from the different timeframes in files.

          Currently I am developing some alternate methods to more easily accomplish this for different line types. As it is, this works, but, like a friend of mine says, it is spagetti code, as it is in the middle of development. Developing these alternate methods has me sidetracked for now (kickin my butt actually) When I figure that out and finish the code (several months off), I will publish on the bb. For now, this may help you out.

          To use this code, left click the chart, and a red dot will be drawn. if this is where you want the line, left click the draw line button on the bottom left of the code. you can delete the line by right clicking the Draw line button until Clear line toggles up. Click within 3 bars of the line you want to delete, then left click the clear button. It will be deleted.

          You can toggle through the selections on the three buttons on the left, those are my currently planned options. The other option that works is the lowest button that says Refresh not Armed. Right click that and you enable the refresh feature.

          Here is where it gets fun, open another advanced chart with the same symbol but a different time frame. load the same efs. You will see all the lines loaded in th efirst chart also appear in the second chart. Now add a line to the second chart. If in real time, that line will be reflected in the first chart. If not in real time, go to the other chart and left click the Refresh Armed button. That line in the second chart will be drawn in the first chart. I loaded it on 5 or 6 charts and it worked well, but it is still a little buggy.

          While I was composing this, I see David posted a method to draw vert lines. I was going to post this anyways, so here it goes. (edit - oops, posted full width)

          Attached Files

          Comment


          • #6
            Thanks!

            Thanks Steve for you code and thanks to dloomis.

            Thanks
            EK

            Comment

            Working...
            X