Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with buttons

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

    Help with buttons

    Hello. Can somebody help me?

    I'm trying to configure a button for the NT8 chart. I want this to display the Buy Pressure values, for example. I have this code, how do I correctly give it the real-time data argument?

    As you can see in the image the button shows zero value.

    Is it possible to do this with a button? What code could I use to make it functional?​

    Thanks.

    Attached Files

    #2
    Hello emsolis88,

    You would need to add some additional code to where you get realtime data to set the buttons text. That could be from OnBarUpdate or OnMarketData. The code you have shown is just where you create the button, that only happens once so that won't continuously update the buttons text. That's just used to set the default value.

    From the image you would use the myButton1 variable to access that button control. When working with UI elements you need to surround that code with a dispatcher so where you use myButton1 needs to also be surrounded by the dispatcher code shown in the image. You can set the buttons content by using its Content property:

    Code:
    ChartControl.Dispatcher.InvokeAsync(() => {
        myButton1.Content = "sometext";
    });

    Comment


      #3
      Thank you so much. I already have it working. I hadn't thought of this.

      Comment


        #4
        Thank you emsolis88 and Jesse,
        That is just what I needed.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        571 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        331 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        549 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        549 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X