Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Disable chart mouse scroll

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

    Disable chart mouse scroll

    I sometimes accidentally scroll a chart if I touch my mouse scroll wheel. Is there a way to disable mouse wheel chart scrolling? I can write a ninjascript if needed to accomplish this.
    thanks.

    #2
    There is no built in way to disable mouse scroll wheel input from adjusting the chart.

    Comment


      #3
      ok, but how about...
      1) Is there a ninascript method to scroll the chart to the last bar, and/or detect that that the chart isn't scrolled to the last bar?
      2) can't I create an indicator to intercept the mouse scroll event and not pass it along to the NT chart code?
      Last edited by tecmisc1; 04-17-2020, 10:01 AM.

      Comment


        #4
        Hello tecmisc1,

        1). there is not a specific method for detecting that its not on the last bar but there are properties you can read to help with getting the bars visible which could be compared with the CurrentBar or Count.
        https://ninjatrader.com/support/help...ghtsub=toindex

        Scrolling is also not something which is currently available but you could use keyboard events to do that. While this is not documented you could see the following indicator for an example of targeting a control, focusing it and sending keys. https://ninjatraderecosystem.com/use...indications-2/
        The charts keyboard shortcuts could then be used to scroll.

        2). That is likely possible, that would require using the preview events in WPF to handle the event. That is again not documented but you can find a sample of doing this with keyboard events which would be the same concept as mouse events, you would just change what event you are using.


        Learn about preview events in Windows Presentation Foundation (WPF) and how to use preview events for composite control event handling.



        I look forward to being of further assistance.
        Last edited by NinjaTrader_Jesse; 04-17-2020, 10:33 AM.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I sometimes accidentally scroll a chart if I touch my mouse scroll wheel. Is there a way to disable mouse wheel chart scrolling?
          is there a way to disable chart scrolling with mouse wheel now in 2021?

          Comment


            #6
            Hello whats1thingnow,

            That is not currently available as an option of the chart. It may be possible to use WPF events to handle the mouse events however I am not aware of a sample of that concept. It would require using the preview mouse events from the WPF controls. That could be the window or chart control or other control. I am not certain which part of the core chart handles the mouse input to provide guidance there. You could experiment using an indicator and trying to handle the mouse events but that will require that you know some about WPF events and also finding controls by the automation id. The link in post 4 shows how to find controls and use WPF events so that would be a starting place. You can also learn about C# and WPF in external resources.

            Please let me know if I may be of further assistance.

            JesseNinjaTrader Customer Service

            Comment


              #7
              sounds like it should be a function on NT8, not something we have to program

              can you please add this to a feature request list?

              i don't need the scroll wheel to scroll my charts when i already have the horizontal scrollbar and we should have an option to disable that - thank you

              Comment


                #8
                Hello whats1thingnow,

                I have submitted a feature request for this.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment


                  #9
                  I would like to add another vote to this feature request please.

                  Comment


                    #10
                    Hello mlprice12,

                    I will put in a vote for that.
                    JesseNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Kaledus, Today, 01:29 PM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by frankthearm, Yesterday, 09:08 AM
                    13 responses
                    45 views
                    0 likes
                    Last Post frankthearm  
                    Started by PaulMohn, Today, 12:36 PM
                    2 responses
                    16 views
                    0 likes
                    Last Post PaulMohn  
                    Started by Conceptzx, 10-11-2022, 06:38 AM
                    2 responses
                    55 views
                    0 likes
                    Last Post PhillT
                    by PhillT
                     
                    Started by yertle, Yesterday, 08:38 AM
                    8 responses
                    37 views
                    0 likes
                    Last Post ryjoga
                    by ryjoga
                     
                    Working...
                    X