Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting line issue

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

    Plotting line issue

    Hello,

    all my plottings I have now for months are ok, but I have a problem with one indicator that is drawing a line and sometimes it doesnt work as expected.

    The line should be removed when price is crossing it and I have in the code:
    if(Highs[0][1] <linex4xD && Highs[0][0]>=linex4xD) {dynupxD=0; RemoveDrawObject("linex12u"); RemoveDrawObject("linexDu");}

    Its interesting that the "linex12u" (a vertical line at startpoint of the horizontal line) is removed but "linexDu" persists. When condition is true (and it is for many other lines working ok and working) then it should remove both.

    I´m working on this now for days but I cant find. When I go to drawing objects it shows the values in the attached screenshot "nt8_line".

    Does this give an hint about the reason?

    (and after compiling when I close the NT-script editor then there appears the attached error-message. Does this give an hint in this concern please?)

    Thank you!
    Tony
    Attached Files
    Last edited by tonynt; 03-22-2021, 10:40 AM. Reason: translation error

    #2
    Hello tonynt,

    Thank you for your post.

    You're referencing a drawing object tag called linexDu in your code example, but the screenshot provided shows a line called dyn4xDu - is this the line you're intending to be removed?

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Hello,

      thank you for your reply. I renamed in my post to simply "line", having not thought that screenshot shows proper name. Sorry!

      Yes this is the line and all lines are removed "usually", the vertical lines and the horizontal lines are removed. I dont understand why sometimes it does not remove like in this screenshot (the corresponding vertical line I have for every horizonal line at startpoint is removed and not plotted anymore) 2 days ago price hit the line so not only the vertical line but also the horizontal line should have been removed.

      In the attached screenshot you can see that I can address the lines, changing the color, and now not having removed the horizontal line. It´s strange that the horizontal line is not removed when the vertical line is removed by same condition.
      (if(Highs[0][1] <dynupx4xD && Highs[0][0]>=dynupx4xD) {dynupxD=0; RemoveDrawObject("dyn4x12u"); RemoveDrawObject("dyn4xDu");})


      Thank you!
      Tony
      Attached Files
      Last edited by tonynt; 03-22-2021, 12:01 PM. Reason: add screenshot

      Comment


        #4
        Hello tonynt,

        Thank you for your reply.

        Can you create a stripped down example script that demonstrates the line not being removed that we can test on our end? We'd really need to be able to reproduce to see what's occurring. We'd just want to see a line created that doesn't seem to get removed when it should.

        Thanks in advance; I look forward to assisting you further.

        Comment


          #5
          Hello Kate,

          thank you for your reply. When trying to build it with reduced condition I found the reason. It was an error in the logic of the story...price comes within.... switch drawings.... price crosses...

          Again I experience how important it is to discuss to someone instead of staring on the screen for hours or days alone without talking about (the story, the problem, the purpose...)

          But I still do not understand where the attached message is referring to. Doesnt this show up somewhere what script, code, indicator, strategy.. it is referring to?

          Thank you for your support!

          Tony
          Attached Files

          Comment

          Latest Posts

          Collapse

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