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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        50 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        41 views
        0 likes
        Last Post CarlTrading  
        Working...
        X