Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Trader information

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

    Chart Trader information

    Hello All

    I try to create information about Total Account Position and about Strategy position in the Chart Trader because NT8 show average position. Sometimes when working my Strategy i opening additional manual position and in this moment I see just average position on the chart. I would like to add two lines in the Chart Trader with information about my Strategy position and about my Total Account Position. I can add it on the chart and it working well but I don't understand how add this information on the Chart Trader. Actually I added it (like TextBlock object) but in current moment it's only static information which creating at the moment of the start Strategy. Could you help me to understand how make that this information will changing with each Order execution?



    Thank you.

    #2
    Hello vitaly_p,

    You can find samples of modifying the chart trader in the following link. NinjaTrader uses the WPF window framework so the controls you can use would be WPF controls.

    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


    A strategy cannot observe manual orders or changes so you would likely need to create an indicator that uses the addon framework to display the account values. You can subscribe to account events using the sample in the following page: https://ninjatrader.com/support/help...ount_class.htm

    The strategy could update its ui based on its own order events from OnOrderUpdate or OnExecutionUpdate.

    Comment


      #3
      Hello Jesse, thank you for your answer.

      I know this sample, but all objects in this sample are static (with non-renewable information).
      I know how take information about Account position and my straregy can take this information.
      I don't understand how create Chart trader object which can take information from OnOrderUpdate (for example) and will redraw information OnEachTick (like it do it Bid and Ask in the Default Chart Trader). The WPF sample don't have this information.

      Comment


        #4
        Hello vitaly_p,

        If you need to update a wpf control you would need to use the variable that you made for your control and then reset its value just like how you initially set its value. To make it not static you can execute that code for events like OrderUpdate to drive the logic which changes your UI.

        When working with the UI in NinjaTrader you are working with WPF controls, to learn more about how to use WPF controls we do suggest looking at external C# WPF examples as that will greatly help with developing UI items in NinjaTrader.

        When working with UI elements in different threads you will need to use the dispatcher for your control or its parent like ChartControl. You can see examples of dispatchers here: https://ninjatrader.com/support/help...sub=dispatcher

        Comment


          #5
          Thank you Jesse!

          I will study this information

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          52 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          70 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X