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 Mestor, 03-10-2023, 01:50 AM
              16 responses
              388 views
              0 likes
              Last Post z.franck  
              Started by rtwave, 04-12-2024, 09:30 AM
              4 responses
              31 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by yertle, Yesterday, 08:38 AM
              7 responses
              29 views
              0 likes
              Last Post yertle
              by yertle
               
              Started by bmartz, 03-12-2024, 06:12 AM
              2 responses
              22 views
              0 likes
              Last Post bmartz
              by bmartz
               
              Started by funk10101, Today, 12:02 AM
              0 responses
              7 views
              0 likes
              Last Post funk10101  
              Working...
              X