To be clear, my goal is to submit orders from an indicator respecting the OcoOrder property from ChartTrader and ideally use the same OCO string so that my orders and ChartTrader's be in the same OCO group. Is this possible?
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
What is the best way to detect that a ChartTrader property changed?
Collapse
X
-
What is the best way to detect that a ChartTrader property changed?
What is the best way to detect that a ChartTrader property changed? In particular, I am interested in knowing when the OcoOrder property changes (using context menu, hotkeys, etc). Additionally, is there a way to access the OCO string used by ChartTrader?
To be clear, my goal is to submit orders from an indicator respecting the OcoOrder property from ChartTrader and ideally use the same OCO string so that my orders and ChartTrader's be in the same OCO group. Is this possible?
Last edited by VolatyTrading; 04-16-2021, 05:39 PM.Tags: None
-
Hello VolatyTrading,
This would be outside of what is documented and supported by NinjaTrader Support, but may be possible with a property changed event.
Below is a link to an example that demonstrates how to the selected Chart Trader Account which can help to get you started.
And a link to an example that has a property changed event.
There is also no documented or supported code made by NinjaTrader to subscribe to hotkey events. This thread will remain open for any community members that may know of an unsupported approach.Chelsea B.NinjaTrader Customer Service
Comment
-
Hi NinjaTrader_ChelseaB,
thanks for the response, but my understanding of property changed events is that the this event is triggered in the property setter.
In my specific case, where I want to be notified on changes to a ChartTrader property, this does not seem to be feasible as the setter in ChartTrader would need to send the notification. Am I missing something?
Comment
-
Hello VolatyTrading,
We would need a PropertyChanged event to subscribe to, which is not available here.
You can reference ChartTrader properties with the following syntax and use intellisense/intelliprompt to peek at certain properties, but please note that these properties are not documented for NinjaScript access. The existing user side Help Guide information may be helpful, however.
Code:ChartControl.OwnerChart.ChartTrader.Properties.OcoOrder
Note that this will tell you if OCO is enabled in ChartTrader, but there would not be a supported means or an unsupported hint I could provide for obtaining ChartTrader's internal OcoId.
Please let us know if you have any additional questions.
JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kaywai, Today, 06:26 AM
|
1 response
3 views
0 likes
|
Last Post
by kaywai
Today, 06:35 AM
|
||
Started by ct, 05-07-2023, 12:31 PM
|
6 responses
202 views
0 likes
|
Last Post
by wisconsinpat
Today, 06:29 AM
|
||
Started by kevinenergy, 02-17-2023, 12:42 PM
|
118 responses
2,779 views
1 like
|
Last Post
by kevinenergy
Today, 05:41 AM
|
||
Started by briansaul, Today, 05:31 AM
|
0 responses
9 views
0 likes
|
Last Post
by briansaul
Today, 05:31 AM
|
||
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
28 views
0 likes
|
Last Post Today, 05:11 AM |
Comment