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 alifarahani, 04-19-2024, 09:40 AM
        9 responses
        54 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by mmckinnm, Today, 01:34 PM
        2 responses
        5 views
        0 likes
        Last Post mmckinnm  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        3 responses
        60 views
        0 likes
        Last Post NinjaTrader_SeanH  
        Started by f.saeidi, Today, 01:32 PM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by traderqz, Today, 12:06 AM
        9 responses
        16 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X