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

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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        8 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        11 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post dustydbayer  
        Working...
        X