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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by wooofad, Today, 11:34 AM
      1 response
      25 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by mr_trade, Today, 08:41 AM
      1 response
      20 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by StoneMan78, Today, 05:24 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by rocgusma, Yesterday, 04:42 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Jorge.andres.o, 09-17-2020, 06:00 PM
      2 responses
      49 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X