Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Zigzag Array

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

    Zigzag Array

    In the script below, I create some arrays to store the zigzag line points.
    But, no lines are drawn on the graph even though the arrays are storing the data.
    Does anyone have an idea why?
    Last edited by rafaelcoisa; 11-01-2022, 09:06 AM.

    #2
    Hello rafaelcoisa,

    Thank you for the post.

    The Series type is just a means of storage but won't display anything on the chart. If you wanted to visualize the series you could use a Plot with AddPlot instead. Plots are identical to series but have a visual aspect.

    If the line you are referring to is the Draw.Line in the script then you would need to add Prints into the code in that section of the file to make sure your condition is happening as you expect to draw the lines.

    I look forward to being of further assistance.

    Comment


      #3
      The conditions are met because I have the value of the points.

      Comment


        #4
        Hello rafaelcoisa,

        Thank you for the post.

        Do you see the objects listed in the charts Drawing tools -> Draw Objects menu?

        I look forward to being of further assistance.

        Comment


          #5
          another try with a better version of the zigzag, same thing.
          I store the data, I can lay it out with "draw text" confirming that it's right there, but the line connecting the dots isn't drawn.
          And, yes, they appear at the Draw Objects menu.

          Last edited by rafaelcoisa; 11-01-2022, 09:07 AM.

          Comment


            #6
            Hello rafaelcoisa,

            The prices shown in the image should not appear in the visible chart, you don't have auto scale on and the object is priced lower than the lowest price visible. Try enabling auto scale so you can see the objects where they are drawn in relation to the price they used.

            I look forward to being of further assistance.

            Comment


              #7
              I put 'true' for autoscale in the Draw.Line method.
              Now the autoscale box is checked in the lines properties window.
              But they are still not being drawn.

              Comment


                #8
                Hello rafaelcoisa,

                Unfortunately I couldn't say what may be wrong based on the details. The objects are physically being drawn as your image shows however without autoscale it would not be visible based on the image.

                One other item may be the bars ago being used. You will likely need to make a simplified test here, for example you could draw a single line in OnBarUpdate and hard code the values. If you can see the line you could then move on to trying some of the values used in the image to see if one of those values relates to not seeing the object.

                I look forward to being of further assistance.

                Comment


                  #9
                  I found the solution, Jesse.
                  I add "CurrentBar-" in the integer entries of the Draw.Line function.
                  Thanks for your concern

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  569 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  330 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  548 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  548 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X