Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 algospoke, Today, 06:40 PM
      0 responses
      9 views
      0 likes
      Last Post algospoke  
      Started by maybeimnotrader, Today, 05:46 PM
      0 responses
      7 views
      0 likes
      Last Post maybeimnotrader  
      Started by quantismo, Today, 05:13 PM
      0 responses
      7 views
      0 likes
      Last Post quantismo  
      Started by AttiM, 02-14-2024, 05:20 PM
      8 responses
      168 views
      0 likes
      Last Post jeronymite  
      Started by cre8able, Today, 04:22 PM
      0 responses
      10 views
      0 likes
      Last Post cre8able  
      Working...
      X