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 NinjaTrader_ChelseaB, 03-14-2017, 10:17 AM
        229 responses
        34,328 views
        7 likes
        Last Post rare312
        by rare312
         
        Started by Graci117, Yesterday, 11:40 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by nissan200sx55, Today, 06:25 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by elirion, Yesterday, 10:03 PM
        5 responses
        13 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by ftsc2022, 10-25-2022, 12:03 PM
        6 responses
        277 views
        0 likes
        Last Post AvaHost
        by AvaHost
         
        Working...
        X