Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get STROKE from plot

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

    Get STROKE from plot

    i.e. we have:
    AddPlot(new Stroke(Brushes.Green, DashStyleHelper.Dash, 2), PlotStyle.Square, "myPlot");


    later in script, how can we obtain, Stroke object for that plot? for example, this doesnt exist:

    Plots[0].Stroke
    (however, exists .StrokeStyle, which is only member of the Stroke object).

    so, is there any easy way to obtain the full Stroke parameter from plot, without manually re-creating?

    #2
    Part of what you have listed above, example,
    var stroke= new stroke(Brushes.Green, DashStyleHelper.Dash, 2);
    AddPlot(stroke, plotstyle,bar, " Name");
    Last edited by Emma1; 08-08-2020, 06:22 PM.

    Comment


      #3
      Hello ttodua,

      Emma1 is correct. The plot does not provide a public stroke property. You would need to create one and supply this to the plot.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      670 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      379 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      582 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X