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:
    https://ninjatraderecosystem.com/use...lay-indicator/

    And also WPF modification examples from our colleague Chelsea:
    https://ninjatrader.com/support/foru...considerations

    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 vitalpilot, Today, 11:14 PM
        1 response
        2 views
        0 likes
        Last Post ezrollin  
        Started by PaulMohn, 09-15-2021, 05:25 AM
        21 responses
        106 views
        0 likes
        Last Post omololu
        by omololu
         
        Started by mcosta72, Today, 04:09 PM
        0 responses
        17 views
        1 like
        Last Post mcosta72  
        Started by Quanto, Today, 02:50 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by Trader108, Today, 01:45 PM
        2 responses
        16 views
        0 likes
        Last Post Trader108  
        Working...
        X