Announcement

Collapse
No announcement yet.

Draw Ray ???

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

  • Draw Ray ???

    Does anyone know of any statements that will "Draw a Ray" from point A through Point B and extend for xbars / periods / intervals to the right???

    Used in the context:

    If condition true then "DrawRay" from A through B, extending xbars, color, line type, thickness

    Note: the ray should only draw when a bar is complete and not based on ticks building a bar.

    I'm new and any cut and paste help would be greatly appreciated.

    Thank you.
    OpaBert

  • #2
    Re: Reply to post 'Draw Ray ???'

    If you could define point A and point B maybe you have a shot at it, but it
    is very complex and not at all straight forward, imho.


    >

    Comment


    • #3
      Hello OpaBert,

      We do have an addLineTool() function that can draw a ray. However, after playing with it this morning I've found that the tag name property is not working as I expected in the current Beta (build 624). You may have to use a combination of removeLineTool() and addLineTool() like in the example below. There is also a clearLineTool() function that will allow you to remove all line tools of the same type at once. The info on these functions can be found at the EFS Help Center under EFS Function Reference --> Drawing Functions.


      PHP Code:
      function preMain() {
          
      setPriceStudy(true);
          
      setStudyTitle(" addLineTooL(Ray) ");
          
      setShowCursorLabel(false);
      }


      function 
      main() {
          
      removeLineTool(LineTool.RAY"tagName");
          
      addLineTool(LineTool.RAY, -10low(-10), 0low(), 2Color.red"tagName");
          
          return;

      Jason K.
      Project Manager
      eSignal - an Interactive Data company

      EFS KnowledgeBase
      JavaScript for EFS Video Series
      EFS Beginner Tutorial Series
      EFS Glossary
      Custom EFS Development Policy

      New User Orientation

      Comment

      Working...
      X