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, 10: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 cmv727, Today, 05:38 AM
          0 responses
          6 views
          0 likes
          Last Post cmv727
          by cmv727
           
          Started by AlessioCianini12, Today, 01:38 AM
          0 responses
          29 views
          0 likes
          Last Post AlessioCianini12  
          Started by nandhumca, Yesterday, 11:54 PM
          0 responses
          29 views
          0 likes
          Last Post nandhumca  
          Started by nandhumca, Yesterday, 11:51 PM
          0 responses
          28 views
          0 likes
          Last Post nandhumca  
          Started by ezrollin, Yesterday, 11:48 PM
          2 responses
          29 views
          0 likes
          Last Post ezrollin  
          Working...
          X