Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possible to create new line types?

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

    Possible to create new line types?

    Hi, I wonder if it was relatively easy to create (add) some more line types: not only
    DashStyleHelper.Dash
    DashStyleHelper.DashDot
    DashStyleHelper.DashDotDot
    DashStyleHelper.Dot
    DashStyleHelper.Solid​

    When not zoomed in, is difficult to see which line is which......

    #2
    Hello artson,

    The DashStyleHelper is an enum that tells the logic in the base.OnRender() what code to run to render the line. Making a custom enum with additional values is possible, but would not change the internal code that renders the line (segments) or dots.

    This means that you would need to create your own custom logic to custom render in the OnRender() override if you want custom line stylings.



    So is possible, but would require custom logic.

    I am happy to submit a feature request for our development to consider adding specific values if you would like.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea,

      I really don't understand what you mean with "custom logic".
      With OnRender I imagine you mean, we could create a "special" line type in our indicator through OnRender?
      But this is usually not desirable, because it generates a lot of calculations, isn't it? (beeing called every few miliseconds instead only at bar close)

      A graphical example: those are the line types we have:
      -------------
      .............
      ​-.-.-.-.-.-.-

      when you have a ot lof lines, it is really (at least for me ) difficult to distinguish between them
      I would appreciate having more "standard" alternatives like:

      - - - - - -
      . . . . . .
      - . - . - .

      I'm sure now you will understand what I mean

      Comment


        #4
        Hello artson,

        I am fully understanding your inquiry. In the core of NinjaTrader, plots are rendered with on render. Choosing a line style with the DashStyleHelper enum changes what logic is used to draw the line segements.

        As it appears you are not asking how to do this yourself, I will be happy to submit a feature request for a new line style.

        To confirm, you want the same line styles but with more space in-between each segment?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_ChelseaB View Post
          To confirm, you want the same line styles but with more space in-between each segment?
          Yes, I wanted in the indicater under:
          Draw.Line(NinjaScriptBaseowner,stringtag,boolisAutoScale,intstartBarsAgo,doublestartY,intendBarsAgo,doubleendY,Brushbrush,DashStyleHelperdashStyle,intwidth)​

          some more DashStyleHelperdashStyle

          Comment


            #6
            Hello artson,

            What 'more' styles do you want to add?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Well, a first idea is with more space between the dots or the dashes, so that they can be easily distinguished
              But maybe you can also have more ideas

              Comment


                #8
                Hello artson,

                Thanks for your note.

                We are currently tracking interest in a feature request that would allow you to increase the space between dots and dashes when using DashStyleHelper.Dash, DashStyleHelper.DashDot, DashStyleHelper.DashDotDot, and DashStyleHelper.Dot.

                I have added your vote to this feature request. This request is being tracked under the number SFT-1020.

                As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                Please let us know if we may be of further assistance to you.​​
                <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                647 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                368 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                108 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                571 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                573 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X