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!
See more
See less

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.



      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 Perr0Grande, Today, 08:16 PM
        0 responses
        2 views
        0 likes
        Last Post Perr0Grande  
        Started by elderan, Today, 08:03 PM
        0 responses
        4 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        9 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Working...
        X