Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Plot Line Width

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

    Plot Line Width

    How can I change the default width of a plot in NT8?

    #2
    Hello afshinmoshrefi,

    Thank you for your note.

    You would use the following within State == State.SetDefaults.

    Code:
    Plots[0].Width = 4;
    So for example,

    Code:
    AddPlot(Brushes.Goldenrod, NinjaTrader.Custom.Resource.NinjaScriptIndicatorNameSMA);
    Plots[0].Width = 4;
    I have also attached a copy of the SMA indicator which has its plot width modified.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      It would be a nice feature to be able to adjust plot width on individual bars as PlotBrushes does for color.

      Comment


        #4
        Hello afshinmoshrefi,

        Thank you for your note.

        This is not something that is currently possible however I will forward your suggestion to the development team and ask them if they can add this to a list of future considerations for the software.

        Please let us know if we may be of further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by tradesmart View Post
          It would be a nice feature to be able to adjust plot width on individual bars as PlotBrushes does for color.
          It would be indeed really nice! It's four years ago now and try and error shows that it hasn't been integrated.
          Is there a workaround or something?

          Greetings

          Comment


            #6
            So far the only workaround I've found that works is to generate several plots with the same properties as the plot with adjustable width, except that all duplicates are set to Brushes.Transparent, each with a different width, and then to give them a color on some events:
            Code:
            if (VolumePercent[1] > 1.8){
            PlotBrushes[8][1] = VolumeColor;
            }
            else if ( VolumePercent[1] > 1.30 && VolumePercent[1] < 1.8){
            PlotBrushes[7][1] = VolumeColor;
            }
            else if ( VolumePercent[1] > 1.10 && VolumePercent[1] < 1.30){
            PlotBrushes[6][1] = VolumeColor;
            }
            Though it can't be real dynamic and complicated if there is more than one easy variable. I am looking forward to a better workaround / solution.

            Edit: and it only works limited to some setups.
            Last edited by seykool; 11-15-2020, 06:10 AM.

            Comment


              #7
              Hello seykool,

              The most direct approach would be to custom render the bars in OnRender().

              Below are links to a few chart styles in the User App Share that have custom logic to custom render the bars at different widths.
              https://ninjatraderecosystem.com/use...ars-option-v1/
              https://ninjatraderecosystem.com/use...e-chart-style/

              As well as a few indicators that render over the bars.
              https://ninjatraderecosystem.com/use...andlesticks-2/
              https://ninjatraderecosystem.com/use...ashi-smoothed/


              The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
              Last edited by NinjaTrader_ChelseaB; 11-15-2020, 08:03 PM.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by tradesmart View Post
                It would be a nice feature to be able to adjust plot width on individual bars as PlotBrushes does for color.
                Dev team? Any update with this? Is this possible in NT8?

                Comment


                  #9
                  Hello neoikon,

                  Thank you for your note.

                  We are still tracking interest in this feature request. I have sent a request to add your vote to track additional interest. I will follow up with the internal tracking number of this request for your reference as soon as your vote has been added.

                  Thanks in advance for your patience.
                  Emily C.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello neoikon,

                    Thanks for your patience.

                    Interest in this feature request is being tracked under the number SFT-5967 and your vote has been added.

                    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 on the Release Notes page of the Help Guide.

                    Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
                    Brandon H.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by CortexZenUSA, Today, 12:53 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post CortexZenUSA  
                    Started by CortexZenUSA, Today, 12:46 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post CortexZenUSA  
                    Started by usazencortex, Today, 12:43 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post usazencortex  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    168 responses
                    2,266 views
                    0 likes
                    Last Post sidlercom80  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    3 responses
                    13 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X