Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Event trigger on Data Series Visual change

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

    Event trigger on Data Series Visual change

    Is there an event trigger to detect when a user changes a visual property of a Data Series? (like the "Center price on scale" for example) It appears that when those visual properties are changed it does not trigger OnStateChange()
    Last edited by martyn73; 02-28-2019, 04:45 PM.

    #2
    Hello martyn73,
    Thanks for your post.

    You would need to create your own logic to check if "Center on price scale"(or any other data series property) has been changed. You can use ChartBars.Properties.CenterPriceOnScale to access that property.

    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Yes, that's what I'm doing. I have added a custom checkbox on the chart trader panel to set this property value. But when you change the value from the data series window the OnStateChange does not trigger so I can't update my custom checkbox right away.

      Right now I have added the code below in the OnRender method which still can cause a delay of the checkbox updating. And it's probably not the best place to put this logic either.

      if(ChartBars != null)
      {
      if (ChartBars.Properties.CenterPriceOnScale)
      {
      if(this.cbCenter != null)
      if (this.cbCenter.IsChecked == false)
      this.cbCenter.IsChecked = true;
      }
      else
      {
      if (this.cbCenter != null)
      if (this.cbCenter.IsChecked == true)
      this.cbCenter.IsChecked = false;
      }
      }

      Is there anything else I can monitor when visual properties in the data series windows are updated?



      Comment


        #4
        martyn73,

        Nothing I can think of at the moment. I will keep looking into this though.
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        63 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        90 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        47 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        105 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        63 views
        0 likes
        Last Post PaulMohn  
        Working...
        X