• 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?

    #2
    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.
    JesseNinjaTrader Customer Service

    Comment


      #3
      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.
      JesseNinjaTrader Customer Service

      Comment


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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by saeed, Today, 12:32 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by motog4, Today, 11:42 AM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by derivtrader, Today, 11:20 AM
        5 responses
        27 views
        0 likes
        Last Post derivtrader  
        Started by TAJTrades, Today, 10:34 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by timcjpfx, Today, 10:20 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X