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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        670 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X