thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Disable chart mouse scroll
Collapse
X
-
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
-
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
-
I sometimes accidentally scroll a chart if I touch my mouse scroll wheel. Is there a way to disable mouse wheel chart scrolling?
Comment
-
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
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Kaledus, Today, 01:29 PM
|
1 response
7 views
0 likes
|
Last Post Today, 01:53 PM | ||
Started by frankthearm, Yesterday, 09:08 AM
|
13 responses
45 views
0 likes
|
Last Post
by frankthearm
Today, 01:52 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
16 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
55 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
||
Started by yertle, Yesterday, 08:38 AM
|
8 responses
37 views
0 likes
|
Last Post
by ryjoga
Today, 01:22 PM
|
Comment