Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Removing old plot values

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

    Removing old plot values

    All I want to do is hide the old target lines
    An image attached is below.

    AddPlot(new Stroke(Brushes.Gold, 2), PlotStyle.Hash, "Target1"); //5
    AddPlot(new Stroke(Brushes.Red, 2), PlotStyle.Hash, "Target2"); //6
    AddPlot(new Stroke(Brushes.ForestGreen, 2), PlotStyle.Hash, "Target3"); //7
    AddPlot(new Stroke(Brushes.DeepSkyBlue, 2), PlotStyle.Hash, "Target4"); //8
    AddPlot(new Stroke(Brushes.Navy, 2), PlotStyle.Hash, "Target5"); //9
    AddPlot(new Stroke(Brushes.Honeydew, 2), PlotStyle.Hash, "Target6"); //10

    These plots can be modified by the user in the parameter section

    I have been trying different things but I can not solve it.
    Attached Files

    #2
    Hello ballboy11,

    Thanks for the additional question.

    In the future, please keep similar inquires in the same thread. We would like to provide clarification in in any thread that you have recently opened so we can avoid duplicate threads. Thanks for understanding.

    I have created an indicator that plots a line at the close of a bar, and can either remove the plots by changing the PlotBrushes value to a transparent value, or it can remove plots by resetting the Plot's Data Series.

    Code:
    if(CurrentBar > 10)
    		for(int i = CurrentBar; i >= 9; i--)
    			PlotBrushes[0][i] = Brushes.Transparent;
    Code:
    if(CurrentBar > 10)
    		Line.Reset(10);
    For the thread's reference, the previous thread can be found here: http://ninjatrader.com/support/forum...d.php?t=100137

    Please let me know if I may be of further help.
    Attached Files

    Comment


      #3
      Got it working thanks


      for (int i = 0; i < CurrentBar -1; i++)
      {
      PlotBrushes[5][i] = Brushes.Transparent;
      PlotBrushes[5][i] = Brushes.Transparent;
      PlotBrushes[6][i] = Brushes.Transparent;
      PlotBrushes[7][i] = Brushes.Transparent;
      PlotBrushes[8][i] = Brushes.Transparent;
      PlotBrushes[9][i] = Brushes.Transparent;
      PlotBrushes[10][i] = Brushes.Transparent;


      }

      I set my index to 60 to see what happens and my plots disappear thank you now the last hurdle is to find the bar index
      Last edited by ballboy11; 05-09-2017, 03:50 PM.

      Comment


        #4
        Hello ballboy11,

        I am glad you have been able to resolve your indexing issue.

        If you have any additional questions, please don't hesitate to ask.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        626 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        359 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        562 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        567 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X