• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing ChartBars ShowGlobalDrawObjects Property Does Not Work

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing ChartBars ShowGlobalDrawObjects Property Does Not Work

    In an AddOn, I am toggling the value of ShowGlobalDrawObjects for the ChartBars object in the active workspace. The property takes the new value, but the Chart does not update using the new value. For example, if global drawings were being displayed, then after the toggle the drawings are still displayed but should not be displayed

    I can verify in the DataSeries properties window that property was changed. Also, if I save the workspace and then restore it, the new value does take affect properly and the drawings are displayed correctly.

    I have tried invalidating the visual to force a redraw, but that does not force the drawings to update. What can I do to force this property to properly take affect?

  • aslane
    replied
    Wow, another half-feature. It seems like everything I try to use to make the platform better turns into this kind of answer.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello aslane,

    To follow up, it looks like this is expected based on the ChartBars object and how it works.

    There is actually a note about this in general and not specific to ShowGlobalDrawObjects.

    https://ninjatrader.com/support/help...properties.htm

    Warning: These are UI properties which are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect.
    In this case, because you are setting a UI property the platform is waiting for a UI action to reload the chart and cause the update. I will put in a feature request for a way to propagate ChartBars UI changes from NinjaScript, or a way to notify the chart of the changes.

    I look forward to being of further assistance.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello aslane,

    Thank you for the question.

    I will need to research this further to see if there is a way to propagate the change to the charts how you are expecting. I see that toggling this from an indicator will change the property as you described when it is run, but the chart requires an additional reload for the drawing objects to reappear. Once I have further details on this, I will reply back here.

    I look forward to being of further assistance.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by priceisking, Today, 01:15 PM
1 response
8 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by 2sureshk, Today, 07:29 AM
1 response
16 views
0 likes
Last Post NinjaTrader_Kate  
Started by frayrengytrader, Today, 10:58 AM
1 response
8 views
0 likes
Last Post NinjaTrader_SergeyS  
Started by levikNT, Today, 11:28 AM
3 responses
27 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by ballboy11, Today, 09:35 AM
1 response
9 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X