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 schmidtbc16, Today, 03:36 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by RT001, Today, 03:25 PM
              2 responses
              12 views
              0 likes
              Last Post RT001
              by RT001
               
              Started by mbrandau, Today, 01:58 PM
              5 responses
              33 views
              0 likes
              Last Post mbrandau  
              Started by remcovdmeulen, Today, 02:15 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Jim  
              Started by gbrad, Today, 09:57 AM
              7 responses
              15 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X