Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Vertical Line to cover full height of Chart window

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

    #16
    Hello Chris,

    I followed closely your instructions, and the end result is the same.

    Comment


      #17
      Hi Botan626,

      Please try this version of the script attached. Import it and say "Yes" to replace the file you have installed currently. The script does use unsupported rendering code, so if this does not work it will need to be tested on a different PC.
      Attached Files
      Chris L.NinjaTrader Customer Service

      Comment


        #18
        Sadly, nothing changed. I even deleted it in script editor and then installed.

        Comment


          #19
          Hello Botan626, thanks for your reply.

          Are you running on a 4k monitor by chance? Please try testing on a different PC if possible. This script is working fine on my end.
          Chris L.NinjaTrader Customer Service

          Comment


            #20
            No, 1920x1080 resolution, 125% scale, 15.6".

            And, just out of curiosity, I changed scale to 100%, and it covers the full height of all panels now!

            Reversing back to 125% makes the line to be limited length again.

            100% scale is impossible to work with on Win10, 125% was default, so I really hope you can fix it in the script.

            Comment


              #21
              Hello Botan626 and others in this thread,

              I think we should be clear that the script I released here uses unsupported code to "trick" NinjaTrader into drawing beyond the ChartPanel the drawing tool was placed. NinjaTrader has internal code that clips rendering to the ChartPanel that is owned by the object. This script breaks out of that clipping rectangle in a "hacky" way in that it attempts to replace the clipping rect with its own. As it is unsupported code, the best I can say is: "if it works for you, great!"

              If this script is not working on your end, there is not really anything else I can do because of the approach that is taken in the script. We do have a feature request tracking interest to have this officially supported, and we will add a vote on your behalf. The feature request ticket ID is SFT-654.

              We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA or promise of fulfillment. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.

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

              If you have any additional inquiries, please do not hesitate to open a new thread.
              JimNinjaTrader Customer Service

              Comment


                #22
                OK, I can hear you Jim, hope this feature will be implemented, you can have my vote for it.

                Comment


                  #23
                  Sorry for the dumb question, but how do I call VerticalLineAllPanels from my indicator?

                  I have the code below in an if statement and would like to replace it with the vert line across all panels but can't figure out the input parameters

                  VerticalLine signalLine = Draw.VerticalLine(this, "BBSqz" + CurrentBar , 0, Brushes.White);
                  signalLine.Stroke = new Stroke(Brushes.White, DashStyleHelper.Dot, 2);

                  Comment


                    #24
                    Hi cre8able, thanks for your post.

                    The script is not supported for NinjaScript access. It needs public constructors added like the other drawing tools have to be called externally. E.g. from the line script:

                    Code:
                    /// <summary>
                            /// Draws a vertical line.
                            /// </summary>
                            /// <param name="owner">The hosting NinjaScript objec t which is calling the draw method</param>
                            /// <param name="tag">A user defined unique id used t o reference the draw object</param>
                            /// <param name="time"> The time the object will be d rawn at.</param>
                            /// <param name="brush">The brush used to color draw  object</param>
                            /// <returns></returns>
                            public static VerticalLine VerticalLine(NinjaScriptBase owner, string tag, DateTime time, Brush brush)
                            {
                                return VerticalLineCore(owner, false,  tag, int.MinValue, time, brush, DashStyleHelper.So lid, 1);
                            }
                    Chris L.NinjaTrader Customer Service

                    Comment


                      #25
                      The reason the "Vertical Line All Panels" does not draw all the way down is simple - the NinjaTrader code does not take into account the scaling factor that is commonly applied to high-resolution displays. That is why if you change your scaling to 100% it works, and is also why for some monitors and scaling factors if you draw a "vertical line all panels" too far to the right in the chart it is invisible. The key fact is that ChartControl.ActualWidth and ChartControl.ActualHeight are unadjusted and need to be adjusted by the scaling factor. The attached revision addresses this, and works correctly for 4K and other high resolution monitors that routinely use a scaling factor of greater than 100%.
                      Attached Files
                      Bruce DeVault
                      QuantKey Trading Vendor Services
                      NinjaTrader Ecosystem Vendor - QuantKey

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Christopher_R, Today, 12:29 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post Christopher_R  
                      Started by sidlercom80, 10-28-2023, 08:49 AM
                      166 responses
                      2,235 views
                      0 likes
                      Last Post sidlercom80  
                      Started by thread, Yesterday, 11:58 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post thread
                      by thread
                       
                      Started by jclose, Yesterday, 09:37 PM
                      0 responses
                      7 views
                      0 likes
                      Last Post jclose
                      by jclose
                       
                      Started by WeyldFalcon, 08-07-2020, 06:13 AM
                      10 responses
                      1,415 views
                      0 likes
                      Last Post Traderontheroad  
                      Working...
                      X