Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How user can update internal variables of indicator , not via properties
Collapse
X
-
How user can update internal variables of indicator , not via properties
HiI have developed a complex indicator in NT8.The indicator has several parameters which control the way to display information on the chart – "display style".At the moment those parameters, usually Boolean and integer variables, are defined as properties of the indicator.In case the user wants to change the "display style" he changes the parameters of the indicator. This cause the indicator to recalculate all the data and display the information in the new "display style".If the user wants to define a new display style on the fly after the indicator is already active and loaded it is inconvenient as too much time is needed to recalculate the data, this action is not needed at all as the data is already within the indicator and all the change is in the "display style".What is needed is a way to communicate with internal variables of the indicator, not properties of the indicator, so that the new display style will be defined based on those variables without the need to recalculate and reload the indicator.Any suggestions how to do it?Tags: None
-
My preferred solution is that the indicator will activate a wpf form which contains a selected collection of internal variables of the indicator.
The form will display the values of the variables within the indicator and update of a variable value on the form will update the corresponding variable inside the indicator.
I have no idea how to do it in NT8.
I will be happy if someone will generate an indicator with one integer variable and one Boolean variable and such a form with the behavior I described above.
Comment
-
Re hiThe more I think about it I think the solution is simple.
Suppose the way ninja behave will be changed as follows:
After chart is loaded with data and indictors are calculated – if the user change any of the properties of the indicator - just update the value of the corresponding property inside the indicator.
If the user wishes he can reload the indicator.If the user wises he can reload the data .This looks simple and effective.If you want to save the current behavior of ninja add a property to the chart and or the indicator so that the user can decide how he wants the chart to behave
Comment
-
Originally posted by doron View PostMy preferred solution is that the indicator will activate a wpf form which contains a selected collection of internal variables of the indicator. The form will display the values of the variables within the indicator and update of a variable value on the form will update the corresponding variable inside the indicator.
I have no idea how to do it in NT8.The most popular way of doing this is to just add a button and menu items to NT's toolbar.. Either bind your menu items to your properties, or update those properties thru the click events....Or, if you want to be more creative.. Create a window, and whatever grids and panels needed for aesthetics.. Add whatever variables to that, and again, either bind your properties, or change them thru the click events.. Then devise a way of showing and hiding that window....There are many examples of buttons and menu items here on the forums that can get you started...
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, Today, 01:16 PM
|
1 response
3 views
0 likes
|
Last Post Today, 01:30 PM | ||
Started by chbruno, 04-24-2024, 04:10 PM
|
3 responses
47 views
0 likes
|
Last Post Today, 01:29 PM | ||
Started by samish18, Today, 01:01 PM
|
1 response
6 views
0 likes
|
Last Post Today, 01:25 PM | ||
Started by WHICKED, Today, 12:56 PM
|
1 response
8 views
0 likes
|
Last Post Today, 01:17 PM | ||
Started by WHICKED, Today, 12:45 PM
|
1 response
11 views
0 likes
|
Last Post Today, 01:08 PM |
Comment