Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Ho to prevent default drag event for chart for my Indicator?
Collapse
X
-
Ho to prevent default drag event for chart for my Indicator?
I add my mouse click and mouse move events and I want to prevent default chart move, i.e. I want to stop move the chart and move only my rendered objects, like it is in Drawing Tools Is it possible?Last edited by handlar; 12-03-2018, 02:46 PM.Tags: None
-
Hello Handlar,
This would be outside of what is supported by NinjaTrader support for an indicator.
Could the indicator instead call Draw methods for custom drawing objects so those objects can be selectable and draggable?
By default, objects that can be rendered when IsInHitTest is true cannot be clicked through and prevent the chart from being clicked on or scrolled. But this would not cause the object to be draggable.
https://ninjatrader.com/support/help...sinhittest.htm
If the rendered object is only rendered when IsInHitTest is false, that object can be clicked through and the chart can scroll.
As an example, in the linked ReuseDxBrushesExample try commenting out line 124, compile, and then load the script on a chart.Last edited by NinjaTrader_ChelseaB; 12-02-2018, 09:45 PM.Chelsea B.NinjaTrader Customer Service
- Likes 1
-
Draw methods have performance issues...
from NinjaScripts best practices:
Using DrawObjects vs custom graphics in OnRender()
When using Draw methods, a new instance of the Draw object is created including its custom rendering and calculation logic. These methods are convenient in many situations, but can quickly introduce performance issues if used too liberally. In some situations, you may see better performance for rendering via SharpDX in OnRender().
"But this would not cause the object to be draggable" draggable logic is ready for my Volume Profile and the only problem is chart stil move with my Volume Profile. Thanks for IsInHitTest. I'll try ItLast edited by handlar; 12-02-2018, 10:57 PM.
Comment
-
Hello handlar,
There are no supported ways to adjust the time or price axis through NinjaScript.
I will forward a feature request on your behalf for the development team to consider allowing the price and time axis to be adjusted programmatically.
Once I have a tracking ID for this request I will post in this thread for future reference.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment