Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to plot another position display in the chart?

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

    How to plot another position display in the chart?

    Would you have any examples that show how to plot another position display in the chart? This would be something similar to the ChartTrader's Position Display.

    I tried playing with the NinjaTrader.Gui.Tools.PositionDisplay class from an indicator's OnRender() method but could not render it on the chart.
    Last edited by Zombie; 12-09-2020, 05:37 PM.

    #2
    Hello Zombie, thanks for your post and welcome to the NinjaTrader forums.

    The PositionDisplay tools is not documented, so I can not give any more info on how that works or how to use it. Some examples that come to mind are the Position Display indicator from the app share site:
    This indicator provides a customizable text box which displays a position’s UnRealized PnL, Realized PnL of a selected account, and the overall cash value of the account.


    And also WPF modification examples from our colleague Chelsea:
    Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've


    Please let me know If I can assist any further.

    Comment


      #3
      Chris, thanks for your reply.

      I now am able to render something in the chart.

      Is it possible share how the PnL box width is calculated so I can replicate it?

      It seems to depend on the font size as well as on the position quantity. These three ranges have different widths:

      - Position quantity < 5,
      - 5 <= Position quantity < 50
      - Position quantity >= 50

      Thanks

      Comment


        #4
        Hello Zombie thanks for the follow up.

        Unfortunately, this type of modification goes outside of the scope of support I am able to provide. Our colleague Chelsea has made some examples here that modify existing WPF elements in the platform, it would be a good reference if you are adding custom controls to the chart:
        https://ninjatrader.com/support/foru...considerations

        Please let me know if this does not resolve your inquiry.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X