Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple way for Plots[0].DashStyle = DashStyle.Dot; in NT8

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

    Simple way for Plots[0].DashStyle = DashStyle.Dot; in NT8

    Hello.

    In NT7, in OnStartUp method I can do:
    Code:
    Plots[0].DashStyle = DashStyle.Dot;
    How can I do the same in NT8 ?
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    Thank you for writing in.

    Plots does not contain a property of DashStyle in NinjaTrader 7.

    Are you referring to PlotStyle?

    The property is also called PlotStyle in NinjaTrader 8.

    Code:
    Plots[0].PlotStyle = PlotStyle.Dot;
    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Excuse me. I mean
      Code:
      Plots[0].Pen.DashStyle = DashStyle.DashDot;
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        Hello fx.practic,

        Thank you for the clarification.

        You'll want to use DashStyleHelper.

        Code:
        Plots[0].DashStyleHelper = DashStyleHelper.DashDot;
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Code:
          Plots[05].Pen.DashStyleHelper = DashStyleHelper.Dot;
          cause error:

          'System.Windows.Media.Pen' does not contain a definition for 'DashStyleHelper' and no extension method 'DashStyleHelper' accepting a first argument of type 'System.Windows.Media.Pen' could be found (are you missing a using directive or an assembly reference?)

          NT 8.0.0.12 64-bit
          fx.practic
          NinjaTrader Ecosystem Vendor - fx.practic

          Comment


            #6
            Hello,

            Thank you for the reply.

            You have used
            .Pen
            which is not the same as DashStyleHelper. Please instead use:

            Code:
            Plots[5].DashStyleHelper = DashStyleHelper.Dot;
            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Oh sure! Excuse me.

              Yes. This works. Thank You.
              fx.practic
              NinjaTrader Ecosystem Vendor - fx.practic

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by t.kelly4149, Today, 05:36 PM
              1 response
              5 views
              0 likes
              Last Post bltdavid  
              Started by SilverSurfer1, Today, 06:29 PM
              0 responses
              14 views
              0 likes
              Last Post SilverSurfer1  
              Started by trader3000a, Today, 01:06 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Started by marcus2300, Today, 11:45 AM
              3 responses
              30 views
              0 likes
              Last Post marcus2300  
              Started by pel11, Today, 11:06 AM
              0 responses
              12 views
              0 likes
              Last Post pel11
              by pel11
               
              Working...
              X