Announcement

Collapse
No announcement yet.

Draw Vertical Gridlines using efs

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

  • Draw Vertical Gridlines using efs

    How exactly does one draw Vertical Gridlines using efs?
    I would like my Vertical Gridlines appear in Dot format not solid on my charts.

  • #2
    RainerAustralia
    The enclosed snippet of code shows an example of how to draw a blue vertical dotted line on every bar time stamped 9:30
    Alex

    PHP Code:
    if((hour(0)*100)+minute(0)==930){
            
    drawLineRelative(0,0,0,Infinity*1,PS_DOT1Color.blue"line"+rawtime(0));
        } 

    Comment


    • #3
      Can you also please detail to me how to create such an efs (from scratch) as I am not familiar creating efs studys.
      Have tried copying your "snippet" into the efs Editor and Wizard, but an error gets displayed when adding the new created efs to a chart.

      Comment


      • #4
        RainerAustralia
        The following images show how to write the script using the Formula Wizard and the resulting chart





        Alternatively you can use the fully commented efs template available here and paste the snippet of code inside the main function.
        If - as you indicate - you are unfamiliar with programming in efs then you may find it to your benefit to learn to do so as that will enable you to take full advantage of the resources offered by the eSignal application. The best way to do this is to start by reviewing the JavaScript for EFS video series and the Core JavaScript Reference Guide. Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS.
        Alex

        Comment


        • #5
          Multiple Vertical Gridlines

          Using the wizard, if I add more sets, ie. set 2, set 3, etc., will I be able to add multiple vertical gridlines?

          I suspect that if set 1 is true then other sets will be ignored.

          I'd like to avoid having to use several efs each with a different time if possible.
          OpaBert

          Comment


          • #6
            Re: Multiple Vertical Gridlines

            OpaBert

            Using the wizard, if I add more sets, ie. set 2, set 3, etc., will I be able to add multiple vertical gridlines?
            Yes you will.

            I suspect that if set 1 is true then other sets will be ignored.
            That is correct. If the first condition (ie Set1) is true then the conditions that follow (ie Set 2, Set 3, etc) will be ignored else the efs will evaluate the next condition (ie Set 2) and if that is true all the subsequent conditions will be ignored else it evaluates the next condition and so on.
            Alex


            Originally posted by OpaBert
            Using the wizard, if I add more sets, ie. set 2, set 3, etc., will I be able to add multiple vertical gridlines?

            I suspect that if set 1 is true then other sets will be ignored.

            I'd like to avoid having to use several efs each with a different time if possible.

            Comment


            • #7
              Contradiction?

              Yes you will.
              How do I edit the Wizard code in order to get "Multiple Vertical Lines" at different times on a chart if only the 1st true condition (ie. set 1) is acted on?

              Because we are dealing with TIME every "set" will be true.

              I know how to show a background color (that displays as a vertical line) when indicators cross. What I am trying to do is something similar a predefined times.
              OpaBert

              Comment


              • #8
                Re: Contradiction?

                OpaBert
                There is no contradiction.
                In Set 2 (and subsequent Sets) you repeat the same condition shown as an example in a prior post except that you change the time of the condition ie if the next line needs to be drawn at 11:00 you replace 930 with 1100. Then assuming the next line needs to be drawn at 14:30 you create a Set 3 with the same condition but replace the time with 1430 and so on.
                The condition in each Set will evaluate to true only at that specific time. So at 9:30 the first condition will be true and draw the line and the efs will ignore the conditions that follow. At 11:00 the first condition will not be true so the efs evaluates the second condition which will be true and so on at each time during the day.
                Alex


                Originally posted by OpaBert
                How do I edit the Wizard code in order to get "Multiple Vertical Lines" at different times on a chart if only the 1st true condition (ie. set 1) is acted on?

                Because we are dealing with TIME every "set" will be true.

                I know how to show a background color (that displays as a vertical line) when indicators cross. What I am trying to do is something similar a predefined times.

                Comment


                • #9
                  Got it!

                  Thanks Alexis,

                  I forgot that the indicators conditions would be evaluated on each subsequent period. Thanks for taking the blinders off .
                  OpaBert

                  Comment


                  • #10
                    Re: Got it!

                    OpaBert
                    You are most welcome
                    Alex


                    Originally posted by OpaBert
                    Thanks Alexis,

                    I forgot that the indicators conditions would be evaluated on each subsequent period. Thanks for taking the blinders off .

                    Comment

                    Working...
                    X