Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing line from specific time

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

    #16
    Hello tkaboris,

    Thanks for your notes.

    Since you are processing this logic in BarsInProgress 1 it is likely drawing at the low of the added series bar when it closes.

    Ultimately, you would need to thoroughly test and debug your logic and compare it to a chart set to the added series to understand and confirm how it is behaving.

    Once you understand how your logic is evaluating, you could try placing your logic in BarsInProgress 0 so it processes on the primary series to see if this suits your overall goal..
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #17
      ok I think i figured it out.
      Can you please help with a loop code to search for this tag and remove it then when price closed above this line ? or maybe you have an example of it..
      Thank you

      Draw.Line(this, "tag1", false, LineStartTime, High830, LineEndTime, High830, Brushes.Blue, DashStyleHelper.Solid, 2);

      Comment


        #18
        Hello tkaboris,

        Thanks for your notes.

        To remove a Draw object from the chart you could use the RemoveDrawObject() method.

        Note that you will need to pass in the exact tag name of the drawing object into the RemoveDrawObject() method to remove that specific object from the chart.

        You could loop through the DrawObjects collection to find a specific draw object.

        See the help guide documentation and reference sample linked below for more information and sample code.

        DrawObjects: https://ninjatrader.com/support/help...rawobjects.htm
        RemoveDrawObject(): https://ninjatrader.com/support/help...drawobject.htm
        SampleRemoveDrawObjects: https://ninjatrader.com/support/help...movedrawobject
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

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