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 PaulMohn, Today, 12:36 PM
      2 responses
      16 views
      0 likes
      Last Post PaulMohn  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      2 responses
      53 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      0 responses
      4 views
      0 likes
      Last Post Kaledus
      by Kaledus
       
      Started by yertle, Yesterday, 08:38 AM
      8 responses
      37 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by rdtdale, Today, 01:02 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Working...
      X