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!
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
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?
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
-
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 Graci117, Today, 09:02 PM
|
1 response
4 views
0 likes
|
Last Post Today, 09:09 PM | ||
Started by ETFVoyageur, Today, 07:55 PM
|
0 responses
7 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:55 PM
|
||
Started by janio973, Today, 07:24 PM
|
1 response
7 views
0 likes
|
Last Post Today, 07:35 PM | ||
Started by aligator, 01-06-2022, 12:14 PM
|
4 responses
246 views
0 likes
|
Last Post
by john_44573
Today, 06:11 PM
|
||
Started by reynoldsn, Today, 05:56 PM
|
0 responses
14 views
0 likes
|
Last Post
by reynoldsn
Today, 05:56 PM
|
Comment