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, 05: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.
      https://ninjatrader.com/support/help...roke_class.htm
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by slimoriginus, Today, 10:07 PM
      0 responses
      5 views
      0 likes
      Last Post slimoriginus  
      Started by slimoriginus, Today, 10:05 PM
      0 responses
      4 views
      0 likes
      Last Post slimoriginus  
      Started by KevinWalker, Today, 07:48 PM
      0 responses
      6 views
      0 likes
      Last Post KevinWalker  
      Started by WaveAtElliot, Today, 05:11 PM
      1 response
      14 views
      1 like
      Last Post hdge4u
      by hdge4u
       
      Started by bosajin, Yesterday, 09:15 AM
      5 responses
      41 views
      0 likes
      Last Post NinjaTrader_Jim  
      Working...
      X