Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawline

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

    Drawline

    I am trying to setup some draw items in my NT script for when and where I am bid or offered and where my stop and target is when in a position. However Here is one line of my code below and I am not seeing an items draw on the chart, what am i missing:-
    Code:
    DrawLine("bid @ bar " + item.Key + CurrentBar, false, 0, item.Key, 0, item.Key, Color.Black, DashStyle.Solid, 2);
    every draw item has a unique tag so they should all be drawn, but nothing.

    #2
    Hello,

    Thank you for the question.

    I see that this is likely being called in a Loop based on the item.Key being used.

    Can you confirm the Price values you are using are valid? I.E. if you use Close[0] instead of item.Key do you see the lines? If the item.Key is not a price value, and you have false for AutoScale, likely the line is being plotted by off screen. You could try turning AutoScale to true instead to have the scale adjust to check for that.

    Otherwise, if this is in a loop, are there items in the collection or is the loop iterating? Have you tried using prints to confirm the logic is being executed where you have this DrawLine?

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      I am stepping tho the code with Visual Studio, the item.Key is valid double price. I have tried switching auto scale to true but still no lines.

      Comment


        #4
        Hello,

        Thank you for the reply.

        I would be unsure without further context of the code, have you tried drawing using specific values such as Close[0]? Or have you taken the drawing objects out of the loop scope and placed it somewhere you can verify it works correct?

        Also is this on the main panel or in a secondary panel?

        If you can ensure the draw command works somewhere outside of the current scope using generic prices, you could move it more into the scope of the loop and locate the problem that way possibly. It would be hard to say at this point without a sample that shows the issue so we could look at what my be happening.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X