Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Extend a line from an indicator

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

    Extend a line from an indicator

    I have drawn a line from point A to point B from my indicator. I want to extend line (identified by it's tag) to the current bar. Is it possible?

    #2
    Hello higher.high,

    Thank you for writing in. Yes this is absolutely possible.
    You simply need to call the DrawLine method again using the same tag.
    For example:
    Code:
    //Your original line where barA is the closest bar to the current bar and barB is the furthest back
    if(!drawn){
    DrawLine("myLine", barA, Close[0], 10, barB, Color.Red);
    drawn = true;
    }
    //Extend the same line
    if(drawn)
    {
    DrawLine("myLine", 0, Close[0], 10, barB, Color.Red);
    }
    Please let me know if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    111 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    59 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    38 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    41 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    78 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X