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

Display a variable in an AddOn Window.

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

    Display a variable in an AddOn Window.

    Based on the examples of AddOnShellNoTab(1) and the PositionOutputExample(2) Indicator, I have been able to join the two scripts in one AddOn (AddonShellNoTabsVb) where I have in one hand the Positions of a trade and the window to be displayed.
    Let me show you:
    In the next screenshot you may see that I can see the actual number of contracts open manually.


    Right now, I only can show this number by clicking the example button.
    Click image for larger version  Name:	NT8 Display a variable.jpg Views:	0 Size:	46.2 KB ID:	1175826
    The problem I’m facing is: I would like that the number of contracts in the play, to be shown automatically in the 'AddonShellNoTabsVb' window, as they are upgraded in the trade, and don’t know how to do it.

    Thank you very Much!!
    FVJ

    PS1:
    Let me give you some spots of interest within the script I'm attaching.





    PS2:
    Here are the links to the source scripts provided by NTscripting team:
    (1) AddonShellNoTabs_NT8.zip
    (2) PositionOutputExample.zip



    PS3:
    Here are the modified code so far. It has two.zip files because Was not able to join the XMAL file in the NT8 Export process
    AddonShellNoTabVb.zip
    AddonShellNoTabsVbXAMLfile.zip
    Last edited by efeuvejota01; 10-21-2021, 11:44 AM. Reason: I forgot to add Tags...

    #2
    Hello, thanks for posting.

    I can not download the example scripts you uploaded, there seems to be an uploading error. You can add in the xaml file by unzipping the export zip and adding the xaml file into the Addons folder then re-zipping the entire package. The PositionUpdate event is where you would update your view. This event triggers every time the position changes and you can read the quality:

    https://ninjatrader.com/support/help...tionupdate.htm

    Best regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chris: I just modify the .zip file as instructed and I am uploading it again. Please let me know if you can download it successfully.
      The PositionUpdate event is where you would update your view. This event triggers every time the position changes and you can read the quality:
      The problem is that I tried too many ways that do not work, that I got without any idea how to solve it.

      Here is the code as my best achievement.
      AddonShellNoTabVb.zip

      Comment


        #4
        Hi efeuvejota01, thanks for your reply.

        I will not be able to review the code and modify this. Please use the PositionUpdate method from the Addon page I sent to update the value from your addon. I also attached a more advanced concept called the MVVM method for data binding and INotifyPropertyChanged event. See attached for the example.

        Best regards,
        -ChrisL
        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Dear Chris:
          Thank you for your post, let me look at the example and work on it! hopefully I will be able to find the way to solve it.
          best regards!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          13 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          5 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          2 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by TheMarlin801, 10-13-2020, 01:40 AM
          21 responses
          3,917 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Working...
          X