object item = _chartWindow.FindFirst("instrumentSelector"); if (item != null) { _instrumentSelector = item as InstrumentSelector; _instrumentSelector.StringValueChanged += InstrumentSelector_StringValueChanged; Print("FOUND"); } else { Print("NOT FOUND"); }
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
Detect Chart Interval Change From Add-On
Collapse
X
-
I know this an old post but to help others, we use code similar to the following:
Code:
-
Of course an AddOn may not have a window, but instead monitor windows, in which case you need a way to monitor when the interval changes.
Leave a comment:
-
Hello aslane,
So far I've been advised that if you use window linking to link your addon window to the chart, you can detect the data series change from the addon if its using an NTTabPage using the setter of the BarsPeriod object.
Below is a public link to the help guide on Window Linking.
Leave a comment:
-
Its ok if it is not available, then run it by development quick. This is a trivial add for those that understand it. As I mentioned, your custom instrument selector already provides the means, and the custom interval selector provides half of the solution. The interval selector just needs to be extended one of several ways to handle the keyboard update.
I can make this work, but really wanted to do it correctly vs hacking something in there.
Leave a comment:
-
Hello aslane,
This would be undocumented and out of the realm of NinjaTrader Support.
I'm uncertain that there is an event accessible from an addon that would trigger when a chart's data series changes..
I'll look around and see if I can find anything helpful.
This thread will also remain open for any community members that would like to assist.
You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
Leave a comment:
-
Detect Chart Interval Change From Add-On
I would like to detect an interval change for a chart from an AddOn. I can almost do it by hooking the toolbar interval selector IntervalChanged event. This works when the interval selector is used to change the interval, but fails when the keyboard is used to change the interval.
Is there a way to do this today? I was not able to find anything.
I do this for an instrument change today by hooking the toolbar instrumentSelector StringValueChanged event, which properly raises an event when with the selector or the keyboard are used.
Can something similar be added to the interval selector? Or can the interval changed event be raised when the interval is changed via the keyboard?
Thanks for the consideration.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Today, 10:57 PM
|
0 responses
1 view
0 likes
|
Last Post
by DJ888
Today, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
Leave a comment: