Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need documentation on Stroke class

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

    Need documentation on Stroke class

    It seems that the Stroke documentation links to the Brushes class.

    I need to find the NT8 way of doing this in NT7:

    Code:
    Pen FooPen= new Pen(Color.Cyan);
    FooPen.DashStyle = DashStyle.DashDot;
    FooPen.Width=1;
    			
    Add(new Plot(FooPen, PlotStyle.Line, "Foo"));
    Many thanks in advance.

    #2
    Hello,

    A Stroke can define each of these items (Brush, Dash Style, and Width), using the following constructor. Note that you will now need to use Brush rather than Pen to set colors.

    Code:
    Stroke(Brush brush, DashStyleHelper dashStyle, float width);
    Example:

    Code:
    AddPlot(new Stroke(Brushes.Blue, DashStyleHelper.DashDot, 1), PlotStyle.Bar, "myPlot");
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Dave View Post
      Hello,

      A Stroke can define each of these items (Brush, Dash Style, and Width), using the following constructor. Note that you will now need to use Brush rather than Pen to set colors.

      Code:
      Stroke(Brush brush, DashStyleHelper dashStyle, float width);
      Example:

      Code:
      AddPlot(new Stroke(Brushes.Blue, DashStyleHelper.DashDot, 1), PlotStyle.Bar, "myPlot");
      Speaking of which, can we still really define a Stroke with a Pen? (See syntax #5).

      ref: http://ninjatrader.com/support/helpG...roke_class.htm

      Did I misunderstand that Pens are kind of verboten when coding in NT8?

      Comment


        #4
        We cannot, and you did not. It looks like we overlooked removing that overload from the help guide, so I'll take care of that now, and it will be gone the next time we publish the help guide. Thanks for catching that.
        Dave I.NinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, Today, 06:46 AM
        0 responses
        8 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, Yesterday, 05:21 PM
        0 responses
        13 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        15 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        82 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        47 views
        0 likes
        Last Post PaulMohn  
        Working...
        X