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 Aviram Y, Today, 05:29 AM
        0 responses
        2 views
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        218 views
        1 like
        Last Post PaulMohn  
        Working...
        X