Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add Calculated Values Under ChartTrader Bid/Ask Display

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

    Add Calculated Values Under ChartTrader Bid/Ask Display

    Hello community,

    The title is pretty self-explanatory, I would like to add two int values, "long risk" and "short risk" that update on each tick to the chart trader display under the bid/ask display. Right now they are displayed as text overlaying the chart in the corner and I think this new way would look cleaner.

    How would I approach this? I was thinking NT_Chelsea's indicator which adds buttons to chart trader would be a good place to start, but I don't know anything about how the Bid/Ask display is coded seeing as the code for chart trader is not public.

    Any point in the right direction, or specific instructions would be greatly appreciated, thank you!

    #2
    Hello lunardiplomacy,

    Thanks for your post.

    A TextBlock is used. I may encourage you to use Intellisense/Intelliprompt and to check System.Windows.Controls to see available WPF Controls and to experiment with using those controls so you become more familiar with them in your custom works.

    Publicly available information can be found below

    TextBlock - https://docs.microsoft.com/en-us/dot...orkdesktop-4.8

    WPF Controls - https://docs.microsoft.com/en-us/dot...orkdesktop-4.8

    I have also attached a modification which adds a TextBlock.

    Let us know if there is anything else we can do to help.
    Attached Files

    Comment


      #3
      Hi, how do you display variables the same way the grid below displays bid and ask prices or calculation logic from OnBarUpdate() instead of fixed text ?
      Close[0].ToString() not displaying correct value and not updating.
      Could you provide some example? thanks.

      Comment


        #4
        Hello Fran09, thanks for your post.

        The best way to render text to the chart is to use sharpDX in the OnRender method. See the "Net Change" indicator as an example of doing this.

        Best regards,
        -ChrisL

        Comment


          #5
          I am currently using OnRender() method and rendering some of the information I need but I wanted to move this information to the label I've added in the chart trader lower grid area.
          But thank you anyway

          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