• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Remove draw object line after refresh

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

  • NinjaTrader_PatrickH
    replied
    Hello davidgamo,

    Thank you for your response.

    There is no method or function to explicitly remove a line that was created via the Intialize() method. You would need some sort of reset for your array. If you add the lines just using Add() and not the array or for loop you should be able to re-adjust the lines.

    Leave a comment:


  • davidgamo
    replied
    Hi

    1) I add the indicator, and in the parameteres menu I set the propierty levels = 1953,09;1963,05;

    I click OK button

    Initialize()
    {
    string[] values = levels.Split(new char[] { ';' });
    foreach (string value in values)
    {
    Line line = new Line(new Pen(Color.Red, 2), number, "sr" + (++count));
    Add(line);

    }
    }

    I see the two lines in the chart.

    2) I open the indicator menu again, and in the parameteres I set the propierty levels = 1954,00;

    I click OK button

    But I see the two last lines. I have tried to delete all the lines in the chart, before the code but the Lines.Length = 0

    Regards

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello davidgamo,

    Thank you for your post.

    Are you changing the value in code or the Indicators menu?

    Leave a comment:


  • davidgamo
    started a topic Remove draw object line after refresh

    Remove draw object line after refresh

    Hi

    I have one property to draw one line.

    I draw the line getting the propierty value in OnBarUpdate when CurrentBar == 0.

    I want to delete all the indicator's line before drawing the line, because when I change the property value and press F5 the line value doesn't refresh.

    Regards

Latest Posts

Collapse

Topics Statistics Last Post
Started by StevenNelson, 10-11-2019, 05:51 AM
2 responses
12 views
0 likes
Last Post ManIp
by ManIp
 
Started by TazoTodua, Today, 12:29 PM
1 response
21 views
0 likes
Last Post bltdavid  
Started by sdauteuil, Today, 03:16 PM
0 responses
6 views
0 likes
Last Post sdauteuil  
Started by Zenersev, Today, 02:11 PM
0 responses
4 views
0 likes
Last Post Zenersev  
Started by TazoTodua, Today, 12:00 PM
0 responses
7 views
0 likes
Last Post TazoTodua  
Working...
X